2

I'm on Mac 10.7,5 and using Perl version

perl -version
This is perl 5, version 12, subversion 3 (v5.12.3)

I'm trying to extract a WAR file locally, so I use the command:

my $ae = Archive::Extract->new( archive => $downloadedFile );

The above line dies with the error:

Cannot determine file type for '/tmp/test.war' at ./update_artifact.pl line 57

I'm able to unzip the file with the command "unzip /tmp/test.war", so I'm not sure what else I should do to my Perl command to fix my problem. Any advice is appreciated, -

4

1 回答 1

4

Archive::Extract不知道.war后缀对应什么。它需要一些帮助。使用type

my $ae = Archive::Extract->new( archive => $downloadedFile, type => 'zip' );
于 2013-11-12T21:41:19.620 回答