in reply to Avoid using a module if it's not available
# This BEGIN block avoids including File::DosGlob::Param for non-windo +ws systems BEGIN { if ( $^O =~ /win/i ) { require File::DosGlob::Param; import File::DosGlob::Param qw( dosglob ); } } # convert filename wildcards to actual filenames if ( $^O =~ /win/i ) # only if DOS { if ( exists( $INC{'File/DosGlob/Param.pm'} ) ) # only if loaded { dosglob( "Array_Ref" => \@ARGV, "Remove_Empty_Matches" => 1, "Warn_On_Empty_Matches" => 1 ); } END { if ( ( $^O =~ /win/i ) and not exists( $INC{'File/DosGlob/Param.pm'} ) ) { warn "Consider installing module File::DosGlob::Param...\n"; } } }
-QM
--
Quantum Mechanics: The dreams stuff is made of
|
|---|