PDA

View Full Version : Net::FTP in v6



Danny Rego
2005-03-01, 12:39
Does anyone have a clue why I can't get Net::FTP to work with v6 of slim server? I've included all files in the Plugins Directory (which worked perfectly on v5.4.x), but for some reason when I attempt to get a "new Net::FTP", I get this error...

Unknown error at C:/PROGRA~1/SLIMSE~1/SERVER/Plugins/WebLogger/Plugin.pm line 1050.

....the call is this...

my $ftp=new Net::FTP($server,
Passive => 0,
Debug => 1
) || die $@;

....this is driving my batty. Anyone have any insight? From inside the FTP.pm module, it seems to die within the constructor when it attempts a NEW on SUPER...

my $ftp = $pkg->SUPER::new(PeerAddr => $peer,
PeerPort => $arg{Port} || 'ftp(21)',
LocalAddr => $arg{'LocalAddr'},
Proto => 'tcp',
Timeout => defined $arg{Timeout}
? $arg{Timeout}
: 120
) or return undef;

....if anyone has an explanation, I'd appreciate it, because this is becoming quite the lengthy debug. (grr!)

Danny Rego

Dan Sully
2005-03-01, 14:05
* Danny Rego shaped the electrons to say...

>Does anyone have a clue why I can't get Net::FTP to work with v6 of slim server? I've included all files in the Plugins Directory (which worked perfectly on v5.4.x), but for some reason when I attempt to get a "new Net::FTP", I get this error...
>
>Unknown error at C:/PROGRA~1/SLIMSE~1/SERVER/Plugins/WebLogger/Plugin.pm line 1050.
>
>...the call is this...
>
>my $ftp=new Net::FTP($server,
> Passive => 0,
> Debug => 1
> ) || die $@;

As a style issue, I'd recommend using Net::FTP->new( ... ) instead, that way
it's clear to you and the code that a method is being called on the Net::FTP class.

What happens when you run under the perl debugger?

-D
--
Do not panic, do not panic! We are trained professionals!
Now, stay calm. We are going around the leaf.

Danny Rego
2005-03-01, 14:30
Activeperl crashes on me when I run slimserver in debug mode...(hence the
poking around in the source)

Danny Rego


----- Original Message -----
From: "Dan Sully" <dan (AT) slimdevices (DOT) com>
To: "Slim Devices Developers" <developers (AT) lists (DOT) slimdevices.com>
Sent: Tuesday, March 01, 2005 4:05 PM
Subject: [Developers] Re: Net::FTP in v6


>* Danny Rego shaped the electrons to say...
>
>>Does anyone have a clue why I can't get Net::FTP to work with v6 of slim
>>server? I've included all files in the Plugins Directory (which worked
>>perfectly on v5.4.x), but for some reason when I attempt to get a "new
>>Net::FTP", I get this error...
>>
>>Unknown error at C:/PROGRA~1/SLIMSE~1/SERVER/Plugins/WebLogger/Plugin.pm
>>line 1050.
>>
>>...the call is this...
>>
>>my $ftp=new Net::FTP($server,
>> Passive => 0,
>> Debug => 1
>> ) || die $@;
>
> As a style issue, I'd recommend using Net::FTP->new( ... ) instead, that
> way
> it's clear to you and the code that a method is being called on the
> Net::FTP class.
>
> What happens when you run under the perl debugger?
>
> -D
> --
> Do not panic, do not panic! We are trained professionals!
> Now, stay calm. We are going around the leaf.
>

Dan Sully
2005-03-01, 14:34
* Danny Rego shaped the electrons to say...

>Activeperl crashes on me when I run slimserver in debug mode...(hence the
>poking around in the source)

Not slimserver debug, but the perl debugger:

perl -d slimserver.pl

then hit 'r' for run. you should get a backtrace when it crashes. Unless it
segfaults, in which case, something else is very wrong. :)


-D
--
You know, for kids.

Danny Rego
2005-03-01, 14:41
That's exactly what I was talking about...I guess I'll have to try an
activeperl re-install first off.

Danny Rego


----- Original Message -----
From: "Dan Sully" <dan (AT) slimdevices (DOT) com>
To: "Slim Devices Developers" <developers (AT) lists (DOT) slimdevices.com>
Sent: Tuesday, March 01, 2005 4:34 PM
Subject: [Developers] Re: Re: Net::FTP in v6


>* Danny Rego shaped the electrons to say...
>
>>Activeperl crashes on me when I run slimserver in debug mode...(hence the
>>poking around in the source)
>
> Not slimserver debug, but the perl debugger:
>
> perl -d slimserver.pl
>
> then hit 'r' for run. you should get a backtrace when it crashes. Unless
> it
> segfaults, in which case, something else is very wrong. :)
>
>
> -D
> --
> You know, for kids.
>