Skip Menu |

This queue is for tickets about the all CPAN distribution.

Report information
The Basics
Id: 40099
Status: resolved
Priority: 0/
Queue: all

People
Owner: piotr.roszatycki [...] gmail.com
Requestors: piotr.roszatycki [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.5
Fixed in: 0.51



Subject: Module doesn't compile
The all module doesn't compile. It missing File::Find::Rule in Build.PL and it would be nice if Makefile.PL was created too. The main problem is that barewords generates problem so this is wrong: use all Sys::; this is ok: use all 'Sys::';
Subject: all_fix_build.patch
=== t/02multiple.t ================================================================== --- t/02multiple.t (/local/all/trunk) (revision 7) +++ t/02multiple.t (/local/all/branches/dexter) (revision 7) @@ -3,7 +3,7 @@ use Test::More no_plan => 1; eval { - use all IO::,Sys::; + use all 'IO::' ,'Sys::'; }; if (!$@) { ok(my $sock = IO::Socket->new()); === t/00single.t ================================================================== --- t/00single.t (/local/all/trunk) (revision 7) +++ t/00single.t (/local/all/branches/dexter) (revision 7) @@ -3,7 +3,7 @@ use Test::More no_plan => 1; eval { - use all IO::; + use all 'IO::'; }; if (!$@) { ok(my $sock = IO::Socket->new()); === t/03multiple_of.t ================================================================== --- t/03multiple_of.t (/local/all/trunk) (revision 7) +++ t/03multiple_of.t (/local/all/branches/dexter) (revision 7) @@ -3,7 +3,7 @@ use Test::More no_plan => 1; eval { - use all of => IO::,Sys::; + use all of => 'IO::', 'Sys::'; }; if (!$@) { ok(my $sock = IO::Socket->new()); === t/01single_of.t ================================================================== --- t/01single_of.t (/local/all/trunk) (revision 7) +++ t/01single_of.t (/local/all/branches/dexter) (revision 7) @@ -3,7 +3,7 @@ use Test::More no_plan => 1; eval { - use all of => IO::; + use all of => 'IO::'; }; if (!$@) { ok(my $sock = IO::Socket->new()); === MANIFEST ================================================================== --- MANIFEST (/local/all/trunk) (revision 7) +++ MANIFEST (/local/all/branches/dexter) (revision 7) @@ -7,3 +7,4 @@ t/01single_of.t t/02multiple.t t/03multiple_of.t +Makefile.PL === lib/all.pm ================================================================== --- lib/all.pm (/local/all/trunk) (revision 7) +++ lib/all.pm (/local/all/branches/dexter) (revision 7) @@ -81,12 +81,12 @@ =head1 SYNOPSIS # use everything in the IO:: namespace - use all of => IO::; - use all IO::; + use all of => 'IO::'; + use all 'IO::'; # use everything in the IO:: and Sys:: namespaces - use all IO::, Sys::; - use all of => IO::, Sys::; + use all 'IO::', 'Sys::'; + use all of => 'IO::', 'Sys::'; =head1 DESCRIPTION === Build.PL ================================================================== --- Build.PL (/local/all/trunk) (revision 7) +++ Build.PL (/local/all/branches/dexter) (revision 7) @@ -4,7 +4,9 @@ module_name => 'all', license => 'perl', requires => { - 'File::Spec' => 0.01 + 'File::Spec' => 0.01, + 'File::Find::Rule' => 0, }, + create_makefile_pl => 'traditional', ); $build->create_build_script; === README ================================================================== --- README (/local/all/trunk) (revision 7) +++ README (/local/all/branches/dexter) (revision 7) @@ -3,12 +3,12 @@ SYNOPSIS # use everything in the IO:: namespace - use all of => IO::; - use all IO::; + use all of => 'IO::'; + use all 'IO::'; # use everything in the IO:: and Sys:: namespaces - use all IO::, Sys::; - use all of => IO::, Sys::; + use all 'IO::', 'Sys::'; + use all of => 'IO::', 'Sys::'; DESCRIPTION With the all pragma you can load multiple modules that share the same
On Czw. 16 Paź. 2008, 10:08:52, DEXTER wrote: Show quoted text
> The all module doesn't compile. It missing File::Find::Rule in
Build.PL Show quoted text
> and it would be nice if Makefile.PL was created too.
I think the "all" could remove dependency on File::Find::Rule. This is a simple pragma so I think it should depends on core modules only.
=== Build.PL ================================================================== --- Build.PL (revision 1092) +++ Build.PL (local) @@ -5,7 +5,6 @@ license => 'perl', requires => { 'File::Spec' => 0.01, - 'File::Find::Rule' => 0, }, create_makefile_pl => 'traditional', ); === lib/all.pm ================================================================== --- lib/all.pm (revision 1092) +++ lib/all.pm (local) @@ -3,11 +3,10 @@ use strict; use warnings; -use IO::Dir; -use File::Spec; -use File::Find::Rule; +use File::Spec (); +use File::Find (); -our $VERSION = '0.5'; +our $VERSION = '0.5001'; sub import { my $class = shift; @@ -34,23 +33,30 @@ } sub find_modules { - my $root = shift; - my $rootfile = module_to_file( $root ); + my $module = shift; + my $moduledir = module_to_file( $module ); my $list = []; - foreach my $dir (@INC) { - my @files = File::Find::Rule->file() - ->name( '*.pm' ) - ->in( - File::Spec->catfile( - $dir, - $rootfile - ) - ); - foreach my $file (@files) { - my $file = File::Spec->abs2rel( $file, $dir ); + + foreach my $incdir (@INC) { + next if ref $incdir; + + my $dir = File::Spec->catfile($incdir, $moduledir); + next unless -d $dir; + + my @files = (); + File::Find::find({ + wanted => sub { + return unless $File::Find::name =~ /\.pm$/; + push @files, $File::Find::name; + }, + no_chdir => 1, + }, $dir); + + foreach my $absfile (@files) { + my $relfile = File::Spec->abs2rel( $absfile, $incdir ); push @$list, { - path => $file, - module => file_to_module( $file ) + path => $relfile, + module => file_to_module( $relfile ) }; } } @@ -98,7 +104,7 @@ =over 4 -=item +=item * This will remove the ability to use exported / optionally exported functions.
Fixed in 0.51.