NAME
Script::isAperlScript - This does a basic check if something is a perl script or not.
VERSION
Version 0.0.0
SYNOPSIS
This module does a basic check to see if something is a perl script.
It will currently check for the matches 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".
More will be added eventually.
EXPORT
isAperlScript
stringIsAperlScript
FUNCTIONS
isAperlScript
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";
}
stringIsAperlScript
This 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";
}
RETURN
The easiest way to check is to verify the returned value is false.
0
It is a Perl script.
1
It is not a Perl script.
2
The string is not defined.
3
The file does not exist.
4
The file is not readable.
5
No file specified.
6
The file could not be opened.
7
The specified file is not a file.
AUTHOR
Zane C. Bowers, <vvelox at vvelox.net>
BUGS
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.
SUPPORT
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
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2010 Zane C. Bowers, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.