| 1 | package Archive::Zip::Parser::Entry::CentralDirectory; | ||||||||||
| 2 | |||||||||||
| 3 | 3 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 3 | ▶ | use Data::ParseBinary; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 3 | ▶ | use base qw( Archive::Zip::Parser::Entry::Header ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 2 | ▶ | sub get_version_made_by { | ||||||||
|
Subroutine
get_version_made_by: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 10 | 2 | my ( $self, $argref ) = @_; | |||||||||
| 11 | |||||||||||
| 12 | 2 | my $version_made_by_struct | |||||||||
| 13 | = Struct( | ||||||||||
| 14 | '_version_made_by', | ||||||||||
| 15 | Byte('_specification_version'), | ||||||||||
| 16 | Byte('_attribute_information'), | ||||||||||
| 17 | ); | ||||||||||
| 18 | my $parsed_version_made_by_struct = | ||||||||||
| 19 | 2 | $version_made_by_struct->parse( $self->{'_version_made_by'} ); | |||||||||
| 20 | |||||||||||
| 21 | 2 | my %version_made_by; | |||||||||
| 22 | my $specification_version = | ||||||||||
| 23 | 2 | $parsed_version_made_by_struct->{'_specification_version'}; | |||||||||
| 24 | 2 | $version_made_by{'specification_version'} = | |||||||||
| 25 | int( $specification_version / 10 ) . '.' | ||||||||||
| 26 | . $specification_version % 10; | ||||||||||
| 27 | |||||||||||
| 28 | 2 | ▶ | if ( $argref->{'describe'} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | 1 | my %attribute_information_description_mapping = ( | |||||||||
| 30 | '0' => 'MS-DOX and OS/2 (FAT / VFAT / FAT32 file systems)', | ||||||||||
| 31 | '1' => 'Amiga', | ||||||||||
| 32 | '2' => 'OpenVMS', | ||||||||||
| 33 | '3' => 'UNIX', | ||||||||||
| 34 | '4' => 'VM/CMS', | ||||||||||
| 35 | '5' => 'Atari ST', | ||||||||||
| 36 | '6' => 'OS/2 H.P.F.S.', | ||||||||||
| 37 | '7' => 'Macintosh', | ||||||||||
| 38 | '8' => 'Z-System', | ||||||||||
| 39 | '9' => 'CP/M', | ||||||||||
| 40 | '10' => 'Windows NTFS', | ||||||||||
| 41 | '11' => 'MVS (OS/390 - Z/OS)', | ||||||||||
| 42 | '12' => 'VSE', | ||||||||||
| 43 | '13' => 'Acorn RISC', | ||||||||||
| 44 | '14' => 'VFAT', | ||||||||||
| 45 | '15' => 'alternate MVS', | ||||||||||
| 46 | '16' => 'BeOS', | ||||||||||
| 47 | '17' => 'Tandem', | ||||||||||
| 48 | '18' => 'OS/400', | ||||||||||
| 49 | '19' => 'OS/X (Darwin)', | ||||||||||
| 50 | ); | ||||||||||
| 51 | $version_made_by{'attribute_information'} = | ||||||||||
| 52 | $attribute_information_description_mapping{ | ||||||||||
| 53 | 1 | $parsed_version_made_by_struct->{'_attribute_information'} }; | |||||||||
| 54 | |||||||||||
| 55 | 1 | return %version_made_by; | |||||||||
| 56 | } | ||||||||||
| 57 | |||||||||||
| 58 | $version_made_by{'attribute_information'} = | ||||||||||
| 59 | 1 | $parsed_version_made_by_struct->{'_attribute_information'}, | |||||||||
| 60 | return %version_made_by; | ||||||||||
| 61 | } | ||||||||||
| 62 | |||||||||||
| 63 | 1 | ▶ | sub get_file_comment_length { | ||||||||
|
Subroutine
get_file_comment_length: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 64 | 1 | my $self = shift; | |||||||||
| 65 | 1 | return $self->{'_file_comment_length'}; | |||||||||
| 66 | } | ||||||||||
| 67 | |||||||||||
| 68 | 1 | ▶ | sub get_start_disk_number { | ||||||||
|
Subroutine
get_start_disk_number: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 69 | 1 | my $self = shift; | |||||||||
| 70 | 1 | return $self->{'_start_disk_number'}; | |||||||||
| 71 | } | ||||||||||
| 72 | |||||||||||
| 73 | 1 | ▶ | sub get_internal_file_attr { | ||||||||
|
Subroutine
get_internal_file_attr: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 74 | 1 | my $self = shift; | |||||||||
| 75 | 1 | return unpack( 'H*', pack( 'N', $self->{'_internal_file_attr'} ) ); | |||||||||
| 76 | } | ||||||||||
| 77 | |||||||||||
| 78 | 1 | ▶ | sub get_external_file_attr { | ||||||||
|
Subroutine
get_external_file_attr: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 79 | 1 | my $self = shift; | |||||||||
| 80 | 1 | return unpack( 'H*', pack( 'N', $self->{'_external_file_attr'} ) ); | |||||||||
| 81 | } | ||||||||||
| 82 | |||||||||||
| 83 | 1 | ▶ | sub get_rel_offset_local_header { | ||||||||
|
Subroutine
get_rel_offset_local_header: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 84 | 1 | my $self = shift; | |||||||||
| 85 | 1 | return unpack( 'H*', pack( 'N', $self->{'_rel_offset_local_header'} ) ); | |||||||||
| 86 | } | ||||||||||
| 87 | |||||||||||
| 88 | 1 | ▶ | sub get_file_comment { | ||||||||
|
Subroutine
get_file_comment: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 89 | 1 | my $self = shift; | |||||||||
| 90 | 1 | return $self->{'_file_comment'}; | |||||||||
| 91 | } | ||||||||||
| 92 | |||||||||||
| 93 | 3 | 1; | |||||||||
| 94 | __END__ | ||||||||||