File-Drawing

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
bottom, and zone letters running bottom to top along the sides. There is
a section inside the box, lower right corner with the blocks for such
things as the title, drawing number, current revision, authoriztion, and
sheet number. There is an expandable four column table in the top right
corner to record the revision history.
 
The data in a drawing may be divided into two parts as follows:
 
contents
    The contents proper is the text and graphics inside the drawing
    boundaries, not including the lower right corner blocked off area
    containing the title and the upper right corner revision history.
    The contents should conform to standards for contents such as ANSI
    X3.5-1970, Flowchart Symbols and their Usage in Information
    Processing.
 
white tape
    The white tape is the drawing information that is not the contents
    such as the drawing number, revision, revision history. This is meta
    type data about the contents.

lib/File/Drawing.pm  view on Meta::CPAN

360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
$pod = '# end of file' unless($pod);
 
#####
# Locate and extract drawing block
#
my $drawing_block='';
$file_contents = '' unless $file_contents;
if($file_contents =~ s|$options->{drawing_block_regex}|$options->{drawing_block_holder}|s) {
    $drawing_block = $1;
}
if(!$drawing_block && $options->{retrieve_unblocked}) {
    if($file_contents =~ s|(\$white_tape # parts.*)|$options->{drawing_block_holder}|s) {
        $drawing_block = $1;
    }
}
unless($drawing_block) {
    $self->broken($drawing_number, $repository);
    $event = "# Drawing block error. Removing ($repository)$drawing_number.\n";
    goto EVENT;
}
$file_contents .= "\n\n1\n" unless $file_contents =~ /1\s*$/;  # 1 at end of program module

lib/File/Drawing.pm  view on Meta::CPAN

863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
The data in a drawing may be divided into two parts
as follows:
 
=over 4
 
=item contents
 
The contents proper is the text and graphics inside the
drawing boundaries, not including the lower right corner
blocked off area containing the title and the upper right
corner revision history.
The contents should conform to standards for contents
such as ANSI X3.5-1970, Flowchart Symbols and their
Usage in Information Processing.
 
=item white tape
 
The white tape is the drawing information that is not
the contents such as the drawing number, revision,
revision history. This is meta type data about

t/File/Drawing.t  view on Meta::CPAN

97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
=head1 comment_out
 
###
# Have been problems with debugger with trapping CARP
#
 
####
# Poor man's eval where the test script traps off the Carp::croak
# Carp::confess functions.
#
# The Perl authorities have Core::die locked down tight so
# it is next to impossible to trap off of Core::die. Lucky
# must everyone uses Carp to die instead of just dieing.
#
use Carp;
use vars qw($restore_croak $croak_die_error $restore_confess $confess_die_error);
$restore_croak = \&Carp::croak;
$croak_die_error = '';
$restore_confess = \&Carp::confess;
$confess_die_error = '';
no warnings;

t/File/File/Package.pm  view on Meta::CPAN

82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
if( @import ) {
 
    ####
    # Import does not work correctly when running under eval. Import
    # uses the caller stack to determine way to stuff the symbols.
    # The eval messes with the stack. Since not using an eval, need
    # to double check to make sure import does not die.
     
    ####
    # Poor man's eval where trap off the Carp::croak function.
    # The Perl authorities have Core::die locked down tight so
    # it is next to impossible to trap off of Core::die. Lucky
    # must everyone uses Carp::croak instead of just dieing.
    #
    # Anyway, get the benefit of a lot of stack gyrations to
    # formulate the correct error msg by Exporter::import.
    #
    $error = '';
    no warnings;
    *Carp::carp = sub {
        $error .= (join '', @_);



( run in 0.407 second using v1.01-cache-2.11-cpan-00829025b61 )