jonasbn > Perl-Critic-Policy-logicLAB-RequireSheBang-0.03 > Perl::Critic::Policy::logicLAB::RequireSheBang

Download:
Perl-Critic-Policy-logicLAB-RequireSheBang-0.03.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.03   Source   Latest Release: Perl-Critic-Policy-logicLAB-RequireSheBang-0.05

NAME ^

Perl::Critic::Policy::logicLAB::RequireSheBang - simple policy for keeping your shebang line uniform

AFFILIATION ^

This policy is a policy in the Perl::Critic::logicLAB distribution. The policy is themed: logiclab.

VERSION ^

This documentation describes version 0.02.

DESCRIPTION ^

This policy is intended in guarding your use of the shebang line. It assists in making sure that your shebang line adheres to certain formats.

The default format is

    #!/usr/local/bin/perl

You can however specify another or define your own in the configuration of the policy.

NB this policy does currently not warn about missing shebang lines, it only checks shebang lines encountered.

CONFIGURATION AND ENVIRONMENT ^

This policy allow you to configure the contents of the shebang lines you want to allow using "formats".

formats

    [logicLAB::RequireSheBang]
    formats = #!/usr/local/bin/perl || #!/usr/bin/perl || #!perl || #!env perl

Since the default shebang line enforced by the policy is:

    #!/usr/local/bin/perl

Please note that if you however what to extend the pattern, you also have to specify was is normally the default pattern since configuration overwrites the default even for extensions.

This mean that if you want to allow:

    #!/usr/local/bin/perl

    #!/usr/local/bin/perl -w
    
    #!/usr/local/bin/perl -wT

Your format should look like the following:

    [logicLAB::RequireSheBang]
    formats = #!/usr/local/bin/perl || #!/usr/local/bin/perl -w || #!/usr/local/bin/perl -wT

DEPENDENCIES AND REQUIREMENTS ^

INCOMPATIBILITIES ^

This distribution has no known incompatibilities.

BUGS AND LIMITATIONS ^

The distribution has now known bugs or limitations. It locates shebang lines through out the source code, not limiting itself to the first line. This might however change in the future, but will propably be made configurable is possible.

BUG REPORTING ^

Please use Requets Tracker for bug reporting:

    http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Critic-logicLAB-RequireSheBang

TEST AND QUALITY ^

The following policies have been disabled for this distribution

See also t/perlcriticrc

TEST COVERAGE

Coverage test executed the following way:

    ./Build testcover

    ---------------------------- ------ ------ ------ ------ ------ ------ ------
    File                           stmt   bran   cond    sub    pod   time  total
    ---------------------------- ------ ------ ------ ------ ------ ------ ------
    ...ogicLAB/RequireSheBang.pm  100.0  100.0   66.7  100.0  100.0  100.0   98.4
    Total                         100.0  100.0   66.7  100.0  100.0  100.0   98.4
    ---------------------------- ------ ------ ------ ------ ------ ------ ------

SEE ALSO ^

AUTHOR ^

ACKNOWLEDGEMENT ^

LICENSE AND COPYRIGHT ^

Copyright (c) 2011 Jonas B. Nielsen, jonasbn. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: