Module Perl

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Module Perl

Postby hostsul » 14. February 2010 03:21

I would like to know how to install a perl module in xampp.

Module: Archive::Zip

OS: Windows Vista 64bit
hostsul
 
Posts: 3
Joined: 14. February 2010 03:14

Re: Module Perl

Postby Wiedmann » 14. February 2010 11:23

Which XAMPP?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Module Perl

Postby hostsul » 14. February 2010 16:51

1.7.2, but now I saw that this module already exists, had not seen before. Sorry.

I do not understand because this module is returning error on xampp on my computer, and the same script runs without errors on the host.

Code: Select all
Can't call method "extractTree" on an undefined value at C:/xampp/htdocs/nabalada/2010/adminstracao/unzip.pl line 13. ,


Script:
Code: Select all
#!"C:\xampp\perl\bin\perl.exe"

use CGI;
print "Content-type: text/html\n\n";
$dados_form = $ENV{'QUERY_STRING'};
($nome, $value) = split(/=/, $dados_form);
($nome2, $value2) = split(/.zip/, $value);

use Archive::Zip;
$arquivo = "$value";
$saida = "./$nome2/";
my $zip = new Archive::Zip($arquivo); # Abre o arquivo
die "Erro ao Gravar" unless $zip->extractTree('', $saida, '') == AZ_OK;
hostsul
 
Posts: 3
Joined: 14. February 2010 03:14

Re: Module Perl

Postby Wiedmann » 14. February 2010 17:39

Code: Select all
my $zip = new Archive::Zip($arquivo); # Abre o arquivo
die "Erro ao Gravar" unless $zip->extractTree('', $saida, '') == AZ_OK;

Can't call method "extractTree" on an undefined value at C:/xampp/htdocs/nabalada/2010/adminstracao/unzip.pl line 13. ,

From the manual I would say, $zip is undefined, because the read from $arquivo fails for any reason. (btw, after reading the manual: isn't it "my $zip = Archive::Zip->new($arquivo);"? or better make the read in a separate step, to get the error message)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 148 guests