Draft - CAD directory-based file format demo


Draft documentation Contained in the Draft distribution.

Index


Code Index:

NAME

Top

Draft - CAD directory-based file format demo

SYNOPSIS

Top

This is just a demonstration, nobody in their right-mind would go and create GUI CAD applications in perl.

DESCRIPTION

Top

An implementation of "An open file format for Computer Aided Design (CAD)"

    L<http://bugbear.blackfish.org.uk/~bruno/draft/>

USAGE

Top

    $Draft::PATH = '/path/to.drawing/';
    Draft->Read;

The 'Draft' module itself is mainly used to bootstrap the world-space that drawings are loaded into - This is accessible via the package variable $Draft::WORLD.


Draft documentation Contained in the Draft distribution.

package Draft;

use strict;
use warnings;
use Draft::Drawing;

our $VERSION = '0.06';
our $WORLD = undef;
our $PATH = undef;

sub Read
{
    $PATH =~ s/\/*$/\//;
    $WORLD->{$PATH} = Draft::Drawing->new ($PATH)
        unless exists $WORLD->{$PATH};

    $WORLD->{$PATH}->Read;
}

1;