NAME

Test::Legal - Test and (optionally) fix copyright notices, LICENSE file, and relevant field of META file

SYNOPSIS

 use Test::Legal;         

 copyright_ok;
 license_ok;

 # Or, to fix things at the same time
 use Test::Legal  -core  => { actions =>['fix']};


 # Here is the more refined way to acomplish the same thing
 use Test::Legal  copyright_ok => { base=> $dir, dirs=> [qw/ sctipt lib /], actions=>['fix'] } ,
                  license_ok => { base=> $dir, actions => [qw/ fix /]};


 # Note,  The  "actions=>['fix']"  automatically fixes things so it can pass testing

DESCRIPTION

  Checks for (a) copyright notices in .pl and .pm distribution files; (b) for author entry 
in META.yml or META.json, which ever peresent; and (c) for existence of LICENSE file, with the
correct license text autogenerate if so desired.

  Although you can alwyas add copyright notices manually to files, Test::Legal can fix things
for you if operated in 'fix' mode (see bellow); alternatively, use the tools available in
script/ named copyright-injection.pl an license-injection.pl .

Fix mode

When "fix" mode is requested, most issues are automatically fixed so testing succeeds 
with a harmless note() send to Test::Harness. 

FUNCTIONS

disable_test_builder

_values

_in_fix_mode

Assumptions: $arg exists and has been validated
Input: the user arguments (a hashref)
Output: TRUE if "fix" mode was specified, otherwise FALSE

set_of_files

annotate_dirs

deanntate_dirs

_build_license_ok

EXPORT

copyritht_ok;
legal_ok;

EXPORT_OK

    disable_test_builder 
	annotate_dirs 
    deannotate_dirs

SEE ALSO

copyright_injection.pl  ( provided with Test::Legal )

Test::Copyright

AUTHOR

Tambouras, Ioannis <ioannis@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2011 by Ioannis Tambouras

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.1 or, at your option, any later version of Perl 5 you may have available.