| 1 | package Draft; | ||||||||||
| 2 | |||||||||||
| 3 | =head1 NAME | ||||||||||
| 4 | |||||||||||
| 5 | Draft - CAD directory-based file format demo | ||||||||||
| 6 | |||||||||||
| 7 | =head1 SYNOPSIS | ||||||||||
| 8 | |||||||||||
| 9 | This is just a demonstration, nobody in their right-mind would go | ||||||||||
| 10 | and create GUI CAD applications in perl. | ||||||||||
| 11 | |||||||||||
| 12 | =head1 DESCRIPTION | ||||||||||
| 13 | |||||||||||
| 14 | An implementation of "An open file format for Computer Aided Design (CAD)" | ||||||||||
| 15 | |||||||||||
| 16 | L<http://bugbear.blackfish.org.uk/~bruno/draft/> | ||||||||||
| 17 | |||||||||||
| 18 | =head1 USAGE | ||||||||||
| 19 | |||||||||||
| 20 | $Draft::PATH = '/path/to.drawing/'; | ||||||||||
| 21 | Draft->Read; | ||||||||||
| 22 | |||||||||||
| 23 | The 'Draft' module itself is mainly used to bootstrap the | ||||||||||
| 24 | world-space that drawings are loaded into - This is accessible via | ||||||||||
| 25 | the package variable $Draft::WORLD. | ||||||||||
| 26 | |||||||||||
| 27 | =cut | ||||||||||
| 28 | |||||||||||
| 29 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 30 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 31 | 1 | ▶ | use Draft::Drawing; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 32 | |||||||||||
| 33 | 1 | our $VERSION = '0.06'; | |||||||||
| 34 | 1 | our $WORLD = undef; | |||||||||
| 35 | 1 | our $PATH = undef; | |||||||||
| 36 | |||||||||||
| 37 | sub Read | ||||||||||
| 38 | 0 | ▶ | { | ||||||||
|
Subroutine
Read: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 39 | 0 | $PATH =~ s/\/*$/\//; | |||||||||
| 40 | $WORLD->{$PATH} = Draft::Drawing->new ($PATH) | ||||||||||
| 41 | 0 | ▶ | unless exists $WORLD->{$PATH}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 42 | |||||||||||
| 43 | 0 | $WORLD->{$PATH}->Read; | |||||||||
| 44 | } | ||||||||||
| 45 | |||||||||||
| 46 | 1 | 1; | |||||||||