GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SCRIPT::ISAPERLSCRIPT (3)

.ds Aq ’

NAME

Script::isAperlScript - This does a basic check if something is a perl script or not.

CONTENTS

VERSION

Version 1.0.0

SYNOPSIS

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/



METHODS

    new

This 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 );



    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";
    }



ERROR CODES/FLAGS/HANDLING

The easiest way to check is to verify the returned value is false.

Error handling is provided by Error::Helper.

    2, noString

The string is not defined.

    3, doesNotExist

The file does not exist.

    4, notReadable

The file is not readable.

    5, fileNotSpecified

No file specified.

    6, noFile

The file could not be opened.

    7, notAfile

The specified file is not a file.

AUTHOR

Zane C. Bowers-Hadley, <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:
o RT: CPAN’s request tracker

<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Script-isAperlScript>

o AnnoCPAN: Annotated CPAN documentation

<http://annocpan.org/dist/Script-isAperlScript>

o CPAN Ratings

<http://cpanratings.perl.org/d/Script-isAperlScript>

o Search CPAN

<http://search.cpan.org/dist/Script-isAperlScript/>

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SCRIPT::ISAPERLSCRIPT (3) 2012-08-04

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.