CAD::Drawing::IO::PgDB is a Perl module with PostgreSQL save / load methods.
This module is considered pre-ALPHA and under-documented. Its use is strongly discouraged except under experimental conditions. Particularly susceptible to change will be the table structure of the database, which currently does not yet even have any auto-create method.
Requisite Plug-in Functions
See CAD::Drawing::IO for a description of the plug-in architecture.
check_type
Returns true if $type is "circ" or $filename is a directory containing a ".circ" file.
$fact = check_type($filename, $type);
Back-End Input and output methods
The functions load() and save() are responsible for determining the filetype (with forced types available via $opt->{type}.) These then call the appropriate load< thing > or save< thing > functions.
load
Loads a CAD::Drawing object from an SQL database. $spec should be of the form required by the database driver.
$opts->{auth} = ["username", "password"] may be required to create a connection.
$drw->load($spec, $opts);
save
$drw->save($spec, $opts);
cleardb
Deletes the drawing and all of its entities from the database.
$drw->cleardb();
Internals
parse_options
Allows options to come in through the $spec or %opts.
%options = parse_options($spec, %opts);
sort_addr
Sorts through @addr_list and returns a hash of array references for each entity type.
%these = sort_addr($layer, @addr_list);
Product's homepage
Requirements:
· Perl