Ioannis Tambouras > Test-Legal-0.10 > Test::Legal

Download:
Test-Legal-0.10.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.10   Source  

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 => {  dirs=> [qw/ sctipt lib /] } ,
                   'license_ok' ,
                   defaults     => { 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_mode

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

set_of_files

annotate_dirs

deanntate_dirs

_build_copyright_ok

_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.

syntax highlighting: