X-Git-Url: http://git.home-dn.net/?p=manu%2FRT-Extension-WatchedQueues.git;a=blobdiff_plain;f=inc%2FModule%2FInstall%2FCan.pm;h=902560763b7efe760a1a21a1acde7334c7861594;hp=002869fd16fbe3272081df3bc0893e19da1cca93;hb=48e8f74ef6190566955be7a09524b449e936680d;hpb=e1833069d86f0e670e7a4be1cd04a5daa97b2d92 diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm index 002869f..9025607 100644 --- a/inc/Module/Install/Can.pm +++ b/inc/Module/Install/Can.pm @@ -1,3 +1,4 @@ +#line 1 package Module::Install::Can; use strict; @@ -10,7 +11,7 @@ use ExtUtils::MakeMaker (); use vars qw{$VERSION $ISCORE @ISA}; BEGIN { - $VERSION = '0.72'; + $VERSION = '0.77'; $ISCORE = 1; @ISA = qw{Module::Install::Base}; } @@ -38,6 +39,7 @@ sub can_run { return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd)); for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') { + next if $dir eq ''; my $abs = File::Spec->catfile($dir, $_[1]); return $abs if (-x $abs or $abs = MM->maybe_command($abs)); } @@ -78,80 +80,4 @@ if ( $^O eq 'cygwin' ) { __END__ -=pod - -=head1 NAME - -Module::Install::Can - Utility functions for capability detection - -=head1 DESCRIPTION - -C contains a number of functions for authors to use -when creating customised smarter installers. The functions simplify -standard tests so that you can express your dependencies and conditions -much more simply, and make your installer much easier to maintain. - -=head1 COMMANDS - -=head2 can_use - - can_use('Module::Name'); - can_use('Module::Name', 1.23); - -The C function tests the ability to load a specific named -module. Currently it will also actually load the module in the -process, although this may change in the future. - -Takes an optional second param of a version number. The currently -installed version of the module will be tested to make sure it is -equal to or greater than the specified version. - -Returns true if the module can be loaded, or false (in both scalar or -list context) if not. - -=head2 can_run - - can_run('cvs'); - -The C function tests the ability to run a named command or -program on the local system. - -Returns true if so, or false (both in scalar and list context) if not. - -=head2 can_cc - - can_cc(); - -The C function test the ability to locate a C compiler on the -local system. Returns true if the C compiler can be found, or false -(both in scalar and list context) if not. - -=head1 TO DO - -Currently, the use of a C command in a single problem domain -(for example C) results in the inclusion of additional -functionality from different problem domains (for example C). - -This module should ultimately be broken up, and the individual -functions redestributed to different domain-specific extensions. - -=head1 AUTHORS - -Audrey Tang Eautrijus@autrijus.orgE - -Adam Kennedy Eadamk@cpan.orgE - -=head1 SEE ALSO - -L, L - -=head1 COPYRIGHT - -Copyright 2006 Audrey Tang, Adam Kennedy. - -This program is free software; you can redistribute it and/or modify it -under the same terms as Perl itself. - -See L - -=cut +#line 158