Test-Fixme-0.08/0000755000175000017500000000000012075307661013001 5ustar ollisgollisgTest-Fixme-0.08/MANIFEST0000644000175000017500000000114212075307661014130 0ustar ollisgollisgChanges LICENSE MANIFEST META.json META.yml Makefile.PL README dist.ini lib/Test/Fixme.pm t/check_project.t t/dirs/deep/deep_a.txt t/dirs/deep/deep_b.txt t/dirs/deep/one/deep_one_a.txt t/dirs/deep/one/deep_one_b.txt t/dirs/deep/two/deep_two_a.txt t/dirs/deep/two/deep_two_b.txt t/dirs/manifest/MANIFEST t/dirs/manifest/alsogood.txt t/dirs/manifest/bad.txt t/dirs/manifest/good.txt t/dirs/normal/four.pod t/dirs/normal/one.txt t/dirs/normal/three.pm t/dirs/normal/two.pl t/dirs/types/normal.txt t/format_results.t t/list_files.t t/load_file.t t/manifest.t t/scan_file.t t/skip_all.t t/skip_git.t t/test-fixme.t Test-Fixme-0.08/lib/0000755000175000017500000000000012075307661013547 5ustar ollisgollisgTest-Fixme-0.08/lib/Test/0000755000175000017500000000000012075307661014466 5ustar ollisgollisgTest-Fixme-0.08/lib/Test/Fixme.pm0000644000175000017500000001612012075307661016074 0ustar ollisgollisgpackage Test::Fixme; use strict; use warnings; use Carp; use File::Find; use ExtUtils::Manifest qw( maniread ); use Test::Builder; require Exporter; use vars qw( @ISA @EXPORT ); @ISA = qw(Exporter); @EXPORT = qw( run_tests ); our $VERSION = '0.08'; # VERSION my $Test = Test::Builder->new; sub run_tests { # Get the values and setup defaults if needed. my %args = @_; $args{match} = 'FIXME' unless defined $args{match} && length $args{match}; $args{where} = '.' unless defined $args{where} && length $args{where}; $args{filename_match} = qr/./ unless defined $args{filename_match} && length $args{filename_match}; # Skip all tests if instructed to. $Test->skip_all("All tests skipped.") if $args{skip_all}; # Get files to work with and set the plan. my @files; if(defined $args{manifest}) { @files = keys %{ maniread( $args{manifest} ) }; } else { @files = list_files( $args{where}, $args{filename_match} ); } $Test->plan( tests => scalar @files ); # Check ech file in turn. foreach my $file (@files) { my $results = scan_file( file => $file, match => $args{match} ); if ( scalar @$results == 0 ) { $Test->ok( 1, "'$file'" ); next; } else { $Test->ok( 0, "'$file'" ); $Test->diag( format_file_results($results) ); } } } sub scan_file { my %args = @_; return undef unless $args{file} && $args{match}; # Get the contents of the files and split content into lines. my $content = load_file( $args{file} ); my @lines = split $/, $content; my $line_number = 0; # Set up return array. my @results = (); foreach my $line (@lines) { $line_number++; next unless $line =~ m/$args{match}/; # We have a match - add it to array. push @results, { file => $args{file}, match => $args{match}, line => $line_number, text => $line, }; } return \@results; } sub format_file_results { my $results = shift; return undef unless defined $results; my $out = ''; # format the file name. $out .= "File: '" . ${$results}[0]->{file} . "'\n"; # format the results. foreach my $result (@$results) { my $line = $$result{line}; my $txt = " $line"; $txt .= ' ' x ( 8 - length $line ); $txt .= $$result{text} . "\n"; $out .= $txt; } return $out; } sub list_files { my $path_arg = shift; croak 'You must specify a single directory, or reference to a list of directories' unless defined $path_arg; my $filename_match = shift; if ( !defined $filename_match ) { # Filename match defaults to matching any single character, for # backwards compatibility with one-arg list_files() invocation $filename_match = qr/./; } my @paths; if ( ref $path_arg eq 'ARRAY' ) { # Ref to array @paths = @{$path_arg}; } elsif ( ref $path_arg eq '' ) { # one path @paths = ($path_arg); } else { # something else croak 'Argument to list_files must be a single path, or a reference to an array of paths'; } foreach my $path (@paths) { # Die if we got a bad dir. croak "'$path' does not exist" unless -e $path; } my @files; find( { preprocess => sub { # no GIT, Subversion or CVS directory contents grep !/^(.git|.svn|CVS)$/, @_, }, wanted => sub { push @files, $File::Find::name if -f $File::Find::name; }, no_chdir => 1, }, @paths ); @files = sort # sort the files grep { m/$filename_match/ } grep { !-l $_ } # no symbolic links @files; return @files; } sub load_file { my $filename = shift; # If the file is not regular then return undef. return undef unless -f $filename; # Slurp the file. open(my $fh, '<', $filename) || croak "error reading $filename $!"; my $content = do { local $/; <$fh> }; close $fh; return $content; } 1; __END__ =head1 NAME Test::Fixme - check code for FIXMEs. =head1 SYNOPSIS # In a test script like 't/test-fixme.t' use Test::Fixme; run_tests(); # You can also tailor the behaviour. use Test::Fixme; run_tests( where => 'lib', # where to find files to check match => 'TODO', # what to check for skip_all => $ENV{SKIP} # should all tests be skipped ); =head1 DESCRIPTION When coding it is common to come up against problems that need to be addressed but that are not a big deal at the moment. What generally happens is that the coder adds comments like: # FIXME - what about windows that are bigger than the screen? # FIXME - add checking of user priviledges here. L allows you to add a test file that ensures that none of these get forgotten in the module. =head2 Arguments By default run_tests will search for 'FIXME' in all the files it can find in the project. You can change these defaults by using 'where' or 'match' as follows: run_tests( where => 'lib', # just check the modules. match => 'TODO' # look for things that are not done yet. ); =over 4 =item where Specifies where to search for files. This can be a scalar containing a single directory name, or it can be a listref containing multiple directory names. =item match Expression to search for within the files. This may be a simple string, or a qr//-quoted regular expression. For example: match => qr/[T]ODO|[F]IXME|[B]UG/, =item filename_match Expression to filter file names. This should be a qr//-quoted regular expression. For example: match => qr/\.(:pm|pl)$/, would only match .pm and .pl files under your specified directory. =item manifest Specifies the name of your MANIFEST file which will be used as the list of files to test instead of I or I. manifest => 'MANIFEST', =back =head1 HINTS If you want to match something other than 'FIXME' then you may find that the test file itself is being caught. Try doing this: run_tests( match => 'TO'.'DO' ); You may also wish to suppress the tests - try this: use Test::Fixme; run_tests( skip_all => $ENV{SKIP_TEST_FIXME} ); You can only run run_tests once per file. Please use several test files if you want to run several different tests. =head1 SEE ALSO L =head1 AUTHOR Current maintainer: Graham Ollis Eplicease@cpan.orgE Please let me know if you have any comments or suggestions. Original author: Edmund von der Burg Eevdb@ecclestoad.co.ukE =head1 ACKNOWLEDGMENTS Dave O'Neill added support for 'filename_match' and also being able to pass a list of several directories in the 'where' argument. Many thanks. =head1 LICENSE Copryight (C) 2008 Edmund von der Burg Copyright (C) 2012 Graham Ollis This library is free software . You can redistribute it and/or modify it under the same terms as perl itself. =cut 1; Test-Fixme-0.08/t/0000755000175000017500000000000012075307661013244 5ustar ollisgollisgTest-Fixme-0.08/t/scan_file.t0000644000175000017500000000307412075307661015360 0ustar ollisgollisguse strict; use warnings; use Test::More tests => 7; # Load the module. use_ok 'Test::Fixme'; { # Check that bad input is not accepted. ok !defined Test::Fixme::scan_file(), "no input"; ok !defined Test::Fixme::scan_file( match => 'TEST' ), "no match"; ok !defined Test::Fixme::scan_file( file => 't/dirs/normal/one.txt' ), "no file"; } { # Scan an empty file to get an empty arrayref. my $arrayref = Test::Fixme::scan_file( file => 't/dirs/normal/four.pod', match => 'TEST' ); ok eq_array( $arrayref, [] ), "empty file, empty array"; } { # Scan a file where there should be one hit. my $arrayref = Test::Fixme::scan_file( file => 't/dirs/normal/one.txt', match => 'ijk' ); my $expected = [ { line => 2, text => "ghijkl", file => 't/dirs/normal/one.txt', match => 'ijk' } ]; ok eq_array( $arrayref, $expected ), "find one result"; } { # scan file that should have several hits. my $arrayref = Test::Fixme::scan_file( file => 't/dirs/normal/two.pl', match => 'TEST' ); my $expected = [ { match => 'TEST', file => 't/dirs/normal/two.pl', line => 8, text => "# TEST - test 1 (line 8)." }, { match => 'TEST', file => 't/dirs/normal/two.pl', line => 10, text => "# TEST - test 2 (line 10)." }, ]; ok eq_array( $arrayref, $expected ), "find two results"; } Test-Fixme-0.08/t/test-fixme.t0000644000175000017500000000014112075307661015512 0ustar ollisgollisguse strict; use warnings; use Test::More tests => 1; # Load the module. use_ok 'Test::Fixme'; Test-Fixme-0.08/t/check_project.t0000644000175000017500000000011612075307661016232 0ustar ollisgollisguse strict; use warnings; use Test::Fixme; run_tests( match => 'B' . 'UG' ); Test-Fixme-0.08/t/load_file.t0000644000175000017500000000112512075307661015346 0ustar ollisgollisguse strict; use warnings; use Test::More tests => 4; # Load the module. use_ok 'Test::Fixme'; { # Test loading of simple file. my $content = Test::Fixme::load_file('t/dirs/normal/one.txt'); my $expected = "abcdef\nghijkl\nmnopqr\nstuvwx\n\n12345\n67890\n"; is $content, $expected, "check simple file"; } { # Test loading of non-existent file. ok !defined Test::Fixme::load_file('t/i/do/not/exist'), "load non-existent file"; } { # Test loading of a zero length file is Test::Fixme::load_file('t/dirs/normal/four.pod'), '', "load zero length file"; } Test-Fixme-0.08/t/list_files.t0000644000175000017500000000601312075307661015566 0ustar ollisgollisguse strict; use warnings; use FindBin (); use File::Spec; use Test::More tests => 14; # Load the module. use_ok 'Test::Fixme'; { # Check that listing a directory that does not exist dies. local $SIG{__WARN__} = sub { 1 }; eval { my @files = Test::Fixme::list_files('t/i/do/not/exist'); }; ok $@, 'list_files died'; ok $@ =~ m:^'t/i/do/not/exist' does not exist:, "check that non-existent directory causes 'die'"; } { # Test that sub croaks unless a path is passed. local $SIG{__WARN__} = sub { 1 }; eval { my @files = Test::Fixme::list_files(); }; ok $@, 'list_files died'; like $@, qr{^You must specify a single directory, or reference to a list of directories}, "check that no directory causes 'die'"; } { # Test the list_files function. my $dir = 't/dirs/normal'; my @files = Test::Fixme::list_files($dir); my @wanted = sort map { "$dir/$_" } qw( one.txt two.pl three.pm four.pod ); is_deeply( \@files, \@wanted, "check correct files returned from '$dir'" ); } { # Check that the search descends into sub folders. my $dir = 't/dirs/deep'; my @files = Test::Fixme::list_files($dir); my @wanted = sort map { "$dir/$_" } map { "$_.txt" } qw'deep_a deep_b one/deep_one_a one/deep_one_b two/deep_two_a two/deep_two_b'; is_deeply( \@files, \@wanted, "check correct files returned from '$dir'" ); } { # Check that we can scan a reference to a list of dirnames my @dirs = qw( t/dirs/normal t/dirs/deep/one ); my @files = Test::Fixme::list_files( \@dirs ); my @wanted = sort qw(t/dirs/deep/one/deep_one_a.txt t/dirs/deep/one/deep_one_b.txt ), map { "t/dirs/normal/$_" } qw( one.txt two.pl three.pm four.pod ); is_deeply( \@files, \@wanted, "check correct files returned from " . join( ', ', @dirs ) ); } { # Test the list_files function with a filename_match regex my $dir = 't/dirs/normal'; my @files = Test::Fixme::list_files( $dir, qr/\.(?:pl|pm)$/ ); my @wanted = sort map { "$dir/$_" } qw( two.pl three.pm ); is_deeply( \@files, \@wanted, "check correct files returned from '$dir'" ); } SKIP: { # Check that non files do not get returned. skip( "cannot create symlink", 4 ) unless eval { symlink( "", "" ); 1 }; my $dir = "t/dirs/types"; my $target = "normal.txt"; my $target_file = "$dir/$target"; my $symlink = "$dir/symlink"; # Make a symbolic link ok symlink( $target, $symlink ), "create symlinked file"; ok -e $symlink, "symlink now exists"; my @files = Test::Fixme::list_files($dir); my @wanted = ($target_file); is_deeply( \@files, \@wanted, "check that non files are not returned from '$dir'" ); ok unlink($symlink), "delete symlinked file"; } { # Test that you can pass in just a file my @list = eval { Test::Fixme::list_files(File::Spec->catfile($FindBin::Bin, 'dirs', 'normal', 'three.pm')) }; diag $@ if $@; like $list[0], qr{three.pm$}, "can give list_files directories or files"; }Test-Fixme-0.08/t/format_results.t0000644000175000017500000000074712075307661016512 0ustar ollisgollisguse strict; use warnings; use Test::More tests => 3; # Load the module. use_ok 'Test::Fixme'; # Check the formating of results. my $results = Test::Fixme::scan_file( file => 't/dirs/normal/two.pl', match => 'TEST' ); ok $results, "got results to work with"; my $expected = << 'STOP'; File: 't/dirs/normal/two.pl' 8 # TEST - test 1 (line 8). 10 # TEST - test 2 (line 10). STOP is Test::Fixme::format_file_results($results), $expected, "check formatting"; Test-Fixme-0.08/t/dirs/0000755000175000017500000000000012075307661014205 5ustar ollisgollisgTest-Fixme-0.08/t/dirs/types/0000755000175000017500000000000012075307661015351 5ustar ollisgollisgTest-Fixme-0.08/t/dirs/types/normal.txt0000644000175000017500000000000012075307661017370 0ustar ollisgollisgTest-Fixme-0.08/t/dirs/normal/0000755000175000017500000000000012075307661015475 5ustar ollisgollisgTest-Fixme-0.08/t/dirs/normal/two.pl0000644000175000017500000000024312075307661016642 0ustar ollisgollisg#!/usr/bin/perl use strict; use warnings; # FIXME - this is bad (line 6). # TEST - test 1 (line 8). # TEST - test 2 (line 10). # Test - bogus test (line 12). Test-Fixme-0.08/t/dirs/normal/four.pod0000644000175000017500000000000012075307661017142 0ustar ollisgollisgTest-Fixme-0.08/t/dirs/normal/three.pm0000644000175000017500000000000012075307661017130 0ustar ollisgollisgTest-Fixme-0.08/t/dirs/normal/one.txt0000644000175000017500000000005112075307661017013 0ustar ollisgollisgabcdef ghijkl mnopqr stuvwx 12345 67890 Test-Fixme-0.08/t/dirs/manifest/0000755000175000017500000000000012075307661016013 5ustar ollisgollisgTest-Fixme-0.08/t/dirs/manifest/MANIFEST0000644000175000017500000000006612075307661017146 0ustar ollisgollisgt/dirs/manifest/good.txt t/dirs/manifest/alsogood.txt Test-Fixme-0.08/t/dirs/manifest/good.txt0000644000175000017500000000000612075307661017500 0ustar ollisgollisgokay. Test-Fixme-0.08/t/dirs/manifest/alsogood.txt0000644000175000017500000000000012075307661020351 0ustar ollisgollisgTest-Fixme-0.08/t/dirs/manifest/bad.txt0000644000175000017500000000001312075307661017274 0ustar ollisgollisgbad FIXME! Test-Fixme-0.08/t/dirs/deep/0000755000175000017500000000000012075307661015122 5ustar ollisgollisgTest-Fixme-0.08/t/dirs/deep/one/0000755000175000017500000000000012075307661015703 5ustar ollisgollisgTest-Fixme-0.08/t/dirs/deep/one/deep_one_a.txt0000644000175000017500000000000012075307661020510 0ustar ollisgollisgTest-Fixme-0.08/t/dirs/deep/one/deep_one_b.txt0000644000175000017500000000000012075307661020511 0ustar ollisgollisgTest-Fixme-0.08/t/dirs/deep/two/0000755000175000017500000000000012075307661015733 5ustar ollisgollisgTest-Fixme-0.08/t/dirs/deep/two/deep_two_a.txt0000644000175000017500000000000012075307661020570 0ustar ollisgollisgTest-Fixme-0.08/t/dirs/deep/two/deep_two_b.txt0000644000175000017500000000000012075307661020571 0ustar ollisgollisgTest-Fixme-0.08/t/dirs/deep/deep_b.txt0000644000175000017500000000000012075307661017067 0ustar ollisgollisgTest-Fixme-0.08/t/dirs/deep/deep_a.txt0000644000175000017500000000000012075307661017066 0ustar ollisgollisgTest-Fixme-0.08/t/manifest.t0000644000175000017500000000021412075307661015234 0ustar ollisgollisguse strict; use warnings; use Test::Fixme; use File::Spec; run_tests( manifest => File::Spec->catfile(qw( t dirs manifest MANIFEST )) ); Test-Fixme-0.08/t/skip_git.t0000644000175000017500000000114612075307661015244 0ustar ollisgollisguse strict; use warnings; use Test::More tests => 2; use File::Temp qw( tempdir ); use Test::Fixme; my $dir = tempdir( CLEANUP => 1 ); foreach my $subdir (qw( .git .svn CVS )) { mkdir(File::Spec->catdir($dir, $subdir)); open(my $fh, '>', File::Spec->catfile($dir, $subdir, 'bad.txt')); close $fh; } mkdir(File::Spec->catdir($dir, 'foo.svn.gitSVNbar')); open(my $fh, '>', File::Spec->catfile($dir, 'foo.svn.gitSVNbar', 'good.txt')); close $fh; my @list = Test::Fixme::list_files($dir); is(scalar @list, 1, 'list length = 1') || diag join "\n", @list; like $list[0], qr{good.txt$}, 'filename =~ good.txt'; Test-Fixme-0.08/t/skip_all.t0000644000175000017500000000005512075307661015227 0ustar ollisgollisguse Test::Fixme; run_tests( skip_all => 1 ); Test-Fixme-0.08/dist.ini0000644000175000017500000000116012075307661014443 0ustar ollisgollisgname = Test-Fixme version = 0.08 author = Graham Ollis license = Perl_5 copyright_holder = Edmund von der Burg , Graham Ollis [GatherDir] [MetaYAML] [MetaJSON] [MakeMaker] [Manifest] [Prereqs] Carp = 0 ExtUtils::MakeMaker = 0 File::Find = 0 Test::Builder = 0 Test::More = 0 [PruneCruft] [License] [OurPkgVersion] [ReadmeAnyFromPod] type = text filename = README location = build [ReadmeAnyFromPod / ReadMePodInRoot] type = pod filename = README.pod location = root [NextRelease] [UploadToCPAN] [MinimumPerl] Test-Fixme-0.08/Makefile.PL0000644000175000017500000000207012075307661014752 0ustar ollisgollisg use strict; use warnings; use 5.006; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "check code for FIXMEs.", "AUTHOR" => "Graham Ollis ", "BUILD_REQUIRES" => {}, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30" }, "DISTNAME" => "Test-Fixme", "EXE_FILES" => [], "LICENSE" => "perl", "NAME" => "Test::Fixme", "PREREQ_PM" => { "Carp" => 0, "ExtUtils::MakeMaker" => 0, "File::Find" => 0, "Test::Builder" => 0, "Test::More" => 0 }, "VERSION" => "0.08", "test" => { "TESTS" => "t/*.t" } ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; my $pp = $WriteMakefileArgs{PREREQ_PM}; for my $mod ( keys %$br ) { if ( exists $pp->{$mod} ) { $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; } else { $pp->{$mod} = $br->{$mod}; } } } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Test-Fixme-0.08/LICENSE0000644000175000017500000004415612075307661014020 0ustar ollisgollisgThis software is copyright (c) 2013 by Edmund von der Burg , Graham Ollis . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2013 by Edmund von der Burg , Graham Ollis . This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2013 by Edmund von der Burg , Graham Ollis . This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Test-Fixme-0.08/META.json0000644000175000017500000000151712075307661014426 0ustar ollisgollisg{ "abstract" : "check code for FIXMEs.", "author" : [ "Graham Ollis " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 4.300028, CPAN::Meta::Converter version 2.120921", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Test-Fixme", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30" } }, "runtime" : { "requires" : { "Carp" : "0", "ExtUtils::MakeMaker" : "0", "File::Find" : "0", "Test::Builder" : "0", "Test::More" : "0", "perl" : "5.006" } } }, "release_status" : "stable", "version" : "0.08" } Test-Fixme-0.08/Changes0000644000175000017500000000145312075307661014277 0ustar ollisgollisgRevision history for Test-Fixme 0.08 2013-01-15 12:19:43 America/New_York - Converted distribution to Dist::Zilla 0.07 - Allow specifying files in addition to directories. 0.06 - Remove dep on File::Slurp - Added manifest option 0.05 - Use File::Find instead of File::Finder - skip .git directory, like .svn and CSV 0.04 - Thu 12 Mar 2009 22:51:51 GMT - Added copyright info 0.03 - Wed Jun 11 19:24:59 BST 2008 - version bump to release to CPAN§ 0.02_01 - Tue, 10 Jun 2008 15:11:01 -0400 dmo - allow list of directory names to be specified in 'where' argument - add 'filename_match' argument to filter for desired filenames 0.02 - switched to makemaker changed tests to give better errors filter out CVS and Subversion files from those tested Test-Fixme-0.08/META.yml0000644000175000017500000000076412075307661014261 0ustar ollisgollisg--- abstract: 'check code for FIXMEs.' author: - 'Graham Ollis ' build_requires: {} configure_requires: ExtUtils::MakeMaker: 6.30 dynamic_config: 0 generated_by: 'Dist::Zilla version 4.300028, CPAN::Meta::Converter version 2.120921' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Test-Fixme requires: Carp: 0 ExtUtils::MakeMaker: 0 File::Find: 0 Test::Builder: 0 Test::More: 0 perl: 5.006 version: 0.08 Test-Fixme-0.08/README0000644000175000017500000000574412075307661013673 0ustar ollisgollisgNAME Test::Fixme - check code for FIXMEs. SYNOPSIS # In a test script like 't/test-fixme.t' use Test::Fixme; run_tests(); # You can also tailor the behaviour. use Test::Fixme; run_tests( where => 'lib', # where to find files to check match => 'TODO', # what to check for skip_all => $ENV{SKIP} # should all tests be skipped ); DESCRIPTION When coding it is common to come up against problems that need to be addressed but that are not a big deal at the moment. What generally happens is that the coder adds comments like: # FIXME - what about windows that are bigger than the screen? # FIXME - add checking of user priviledges here. Test::Fixme allows you to add a test file that ensures that none of these get forgotten in the module. Arguments By default run_tests will search for 'FIXME' in all the files it can find in the project. You can change these defaults by using 'where' or 'match' as follows: run_tests( where => 'lib', # just check the modules. match => 'TODO' # look for things that are not done yet. ); where Specifies where to search for files. This can be a scalar containing a single directory name, or it can be a listref containing multiple directory names. match Expression to search for within the files. This may be a simple string, or a qr//-quoted regular expression. For example: match => qr/[T]ODO|[F]IXME|[B]UG/, filename_match Expression to filter file names. This should be a qr//-quoted regular expression. For example: match => qr/\.(:pm|pl)$/, would only match .pm and .pl files under your specified directory. manifest Specifies the name of your MANIFEST file which will be used as the list of files to test instead of *where* or *filename_match*. manifest => 'MANIFEST', HINTS If you want to match something other than 'FIXME' then you may find that the test file itself is being caught. Try doing this: run_tests( match => 'TO'.'DO' ); You may also wish to suppress the tests - try this: use Test::Fixme; run_tests( skip_all => $ENV{SKIP_TEST_FIXME} ); You can only run run_tests once per file. Please use several test files if you want to run several different tests. SEE ALSO Devel::FIXME AUTHOR Current maintainer: Graham Ollis Please let me know if you have any comments or suggestions. Original author: Edmund von der Burg ACKNOWLEDGMENTS Dave O'Neill added support for 'filename_match' and also being able to pass a list of several directories in the 'where' argument. Many thanks. LICENSE Copryight (C) 2008 Edmund von der Burg Copyright (C) 2012 Graham Ollis This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.