Script::isAperlScript - This does a basic check if something is a perl script or not.
Version 1.0.0
This 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/
This initiates the object.
Allow env based scripts.
By default this is false as it can't be trusted.
This does very loose matching.
my $checker=Script::isAperlScript->new( \%args );
This 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"; }
This checks if a string is a Perl script.
my $returned=stringIsAperlScript($string); if(!$returned){ print "It returned false so there for it is a perl script.\n"; }
The easiest way to check is to verify the returned value is false.
Error handling is provided by Error::Helper.
The string is not defined.
The file does not exist.
The file is not readable.
No file specified.
The file could not be opened.
The specified file is not a file.
Zane C. Bowers-Hadley, <vvelox at vvelox.net>
<vvelox at vvelox.net>
Please 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.
bug-script-isaperlscript at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Script::isAperlScript
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Script-isAperlScript
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Script-isAperlScript
CPAN Ratings
http://cpanratings.perl.org/d/Script-isAperlScript
Search CPAN
http://search.cpan.org/dist/Script-isAperlScript/
Copyright 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.
To install Script::isAperlScript, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Script::isAperlScript
CPAN shell
perl -MCPAN -e shell install Script::isAperlScript
For more information on module installation, please visit the detailed CPAN module installation guide.