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
Script::isAperlScript(3) User Contributed Perl Documentation Script::isAperlScript(3)

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.

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

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.

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

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

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.

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.

2012-08-04 perl v5.32.1

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

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