The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Acme::SafetyGoggles - Protects programmer's eyes from source filtering

VERSION

Version 0.06

SYNOPSIS

    $ perl -MAcme::SafetyGoggles possibly_dangerous_script.pl

DESCRIPTION

Is some module you imported using source filtering? If the answer is yes, or if the answer is "I don't know", then you can't trust the code in front of your own eyes!

That's why you should always use patent-pending Acme::SafetyGoggles in your untrusted Perl code. Acme::SafetyGoggles compares your original source file with the code that is actually going to be run, and alerts you to any differences.

SUBROUTINES/METHODS

state

Acme::SafetyGoggles->state

Returns this module's assessment of whether the source code of the current program has been modified. Return value is either "safe" or "unsafe".

diff

Acme::SafetyGoggles->diff

If source code modification has been detected, returns the result of the Text::Diff::diff call between the pure and the modified source. This output will remind you of the output of the Unix diff command.

BUGS AND LIMITATIONS

Acme::SafetyGoggles can only (maybe) protect you from source filtering. It is not designed or warranted to protect you from improper use of any other potentially dangerous or evil Perl construction.

Acme::SafetyGoggles does not operate on code specified by perl's -e command line option.

Acme::SafetyGoggles may yield a false positive if the input turns source code filtering on and off with calls to use XXX::SourceFilter ... no XXX::SourceFilter, or in other files where the source filter has a limited scope.

    trustable_code();
    use The::Source::Filter;
    some_code_you_cant_trust();
    no The::Source::Filter;
    more_trustable_code();


    trustable_code();
    {
        use The::Source::Filter;
        some_code_you_cant_trust();
    }
    more_trustable_code();

This module really only works on source filters that already use the Filter::Simple mechanism. Even then, there are probably still a lot of ways to source filter the code so that it won't be detected by this module.

Please report any other bugs or feature requests to bug-acme-safetygoggles at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-SafetyGoggles. I will be notified, and then you'll automatically be given a commit bit for this distribution on PAUSE. Um, I mean that you'll automatically be notified of progress on your bug as I make changes.

AUTHOR

Marty O'Brien, <mob at cpan.org>

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Acme::SafetyGoggles

You can also look for information at:

ACKNOWLEDGEMENTS

Inspired by comments on source filtering from stackoverflow.com's Ether: http://stackoverflow.com/questions/2818155/#2819871

LICENSE AND COPYRIGHT

Copyright 2010,2013 Marty O'Brien.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.