| 1 |
package AllSrcBin; |
| 2 |
use warnings; |
| 3 |
use strict; |
| 4 |
use integer; |
| 5 |
|
| 6 |
# Build a complete source hash or binary hash (but don't cross-reference |
| 7 |
# or cross-link it yet). |
| 8 |
sub new { |
| 9 |
my $class = shift; |
| 10 |
my $self = {}; |
| 11 |
bless $self, $class; |
| 12 |
for my $filename ( @_ ) { |
| 13 |
my $fh; |
| 14 |
open $fh, '<', $filename; |
| 15 |
while ( my $pkg = $self->instantiate_one( $fh ) ) { |
| 16 |
my $pname = $pkg->{Package}; |
| 17 |
if ( $self->{$pname} ) { |
| 18 |
warn "$0: warning: second listing of $pname ignored\n"; |
| 19 |
} |
| 20 |
else { $self->{$pname} = $pkg }; |
| 21 |
} |
| 22 |
close $fh; |
| 23 |
} |
| 24 |
return $self; |
| 25 |
} |
| 26 |
|
| 27 |
1; |
| 28 |
|