Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 26724
Status: resolved
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: mgrey [...] tivo.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: BUG - File::Listing parse failure on BSD Linux based systems
Date: Thu, 26 Apr 2007 10:49:08 -0700
To: <bug-libwww-perl [...] rt.cpan.org>
From: "Michael Grey" <mgrey [...] tivo.com>
Synopsys : The output from ' ls -l ' on BSD based Linux systems ( such as Slackware ) provides a different output than in Centos / RH derivatives. drwxr-xr-x 4 root root 4096 Apr 25 14:57 .. vs drwxr-xr-x 21 root root 704 2007-03-22 21:48 .. Most notably, the date string. This causes the parse / test in File::Listing to fail, if (($kind, $size, $date, $name) = /^([\-FlrwxsStTdD]{10}) # Type and permission bits .* # Graps \D(\d+) # File size \s+ # Some space (\w{3}\s+\d+\s+(?:\d{1,2}:\d{2}|\d{4})) # Date \s+ # Some more space (.*)$ # File name /x ) which calls else { # parse failed, check if the dosftp parse understands it return(File::Listing::dosftp->line($_,$tz,$error)); } Which also fails. The result is that 'parse_dir' returns no values. Changing the regex for Date to : ([\-0-9]{10}\s+(?:\d{1,2}:\d{2}|\d{4})) solves this issue. Please implement ????? :-) Thanks Michael Grey TiVo
From: hfroehlich [...] co-de-co.de
Ubuntu seems to have the same problem attached. I've applied the following patch to 'Listing.pm' which keeps the original pattern recognition while it adds the distribution's pattern as an additional alternative. --- Listing.pm.org 2008-05-26 10:38:26.000000000 +0200 +++ Listing.pm 2008-05-26 11:30:27.000000000 +0200 @@ -144,7 +144,7 @@ .* # Graps \D(\d+) # File size \s+ # Some space - (\w{3}\s+\d+\s+(?:\d{1,2}:\d{2}|\d{4})) # Date + (\w{3}\s+\d+\s+(?:\d{1,2}:\d{2}|\d{4})|\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}) # Date \s+ # Some more space (.*)$ # File name /x ) It would have been nice if this or a more generic solution to this issue could have been incorporated into the package. Regards, Hans-H. Froehlich
This patch has now been applied. Thanks!