On Aug 19, 2006, at 7:40 AM, alexchorny@gmail.com via RT wrote:
Show quoted text>
> Sat Aug 19 08:40:12 2006: Request 21079 was acted upon.
> Transaction: Ticket created by alexchorny@gmail.com
> Queue: Perl-Critic
> Subject: Archive error; grep clears @SITE_POLICIES
> Broken in: 0.18_01
> Severity: Critical
> Owner: Nobody
> Requestors: alexchorny@gmail.com
> Status: new
> Ticket <URL:
http://rt.cpan.org/Ticket/Display.html?id=21079 >
>
>
> Windows XP.
>
> 1. Archive contains 'RequireUpperCaseHeredocTerminator.pm0000644'
> instead of 'RequireUpperCaseHeredocTerminator.pm' (shown by FAR). My
> Windows tar unpacks it as 'RequireUpperCaseHeredocTerminator.p'.
> 2. Tests fails, because in Perl::Critic::Config, sub import,
> @SITE_POLICIES is empty after grep.
> File::Spec->catdir returns string with Windows path slashes, but %INC
> contains Unix path slashes.
> After replacing
> my %files = map { $_ => File::Spec->catdir(split m/::/xms,
> $_) .
> '.pm' } @SITE_POLICIES;
> with
> my %files = map { $a=File::Spec->catdir(split m/::/xms, $_) .
> '.pm';$a=~s#\\#/#g;$_ => $a } @SITE_POLICIES;
> all tests pass.
>
> -------
> Alexandr Ciornii,
http://chorny.net
>
>
Good catch. A simpler patch would be:
my %files = map { $_ => File::Spec::Unix->catdir(split m/::/xms,
$_) '.pm' } @SITE_POLICIES;
(note the "::Unix")
Chris
--
Chris Dolan, Software Developer, Clotho Advanced Media Inc.
608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703
vCard:
http://www.chrisdolan.net/ChrisDolan.vcf
Clotho Advanced Media, Inc. - Creators of MediaLandscape Software
(
http://www.media-landscape.com/) and partners in the revolutionary
Croquet project (
http://www.opencroquet.org/)