|
NAMEScript::isAperlScript - This does a basic check if something is a perl script or not.VERSIONVersion 1.0.0SYNOPSISThis module does a basic check to see if something is a perl script.By default it checks for the paths below. /^\#\!\/usr\/bin\/perl/ /^\#\!\/usr\/bin\/suidperl/ /^\#\!\/usr\/local\/bin\/perl/ /^\#\!\/usr\/local\/bin\/suidperl/ This will also match stuff like "#!/usr/local/bin/perl5.8.9". If {env=>1} is given to the new method, the checks below are done. /^\#!\/usr\/bin\/env.*perl/ If {any=>1} is given to the new method, the checks below are done. /^\#!\/.*perl/ METHODSnewThis initiates the object.args hash env Allow env based scripts. By default this is false as it can't be trusted. any This does very loose matching. By default this is false as it can't be trusted. my $checker=Script::isAperlScript->new( \%args ); isAperlScriptThis checks if a file is a Perl script.Only one arguement is taken and it is the string in question. In regards to the returned value, see the section "RETURN" for more information. my $returned=isAperlScript($file); if(!$returned){ print "It returned false so there for it is a perl script.\n"; } stringIsAperlScriptThis checks if a string is a Perl script.Only one arguement is taken and it is the string in question. In regards to the returned value, see the section "RETURN" for more information. my $returned=stringIsAperlScript($string); if(!$returned){ print "It returned false so there for it is a perl script.\n"; } ERROR CODES/FLAGS/HANDLINGThe easiest way to check is to verify the returned value is false.Error handling is provided by Error::Helper. 2, noStringThe string is not defined.3, doesNotExistThe file does not exist.4, notReadableThe file is not readable.5, fileNotSpecifiedNo file specified.6, noFileThe file could not be opened.7, notAfileThe specified file is not a file.AUTHORZane C. Bowers-Hadley, "<vvelox at vvelox.net>"BUGSPlease report any bugs or feature requests to "bug-script-isaperlscript at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Script-isAperlScript>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.SUPPORTYou can find documentation for this module with the perldoc command.perldoc Script::isAperlScript You can also look for information at:
ACKNOWLEDGEMENTSCOPYRIGHT & LICENSECopyright 2012 Zane C. Bowers-Hadley, all rights reserved.This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |