Skip Menu |

This queue is for tickets about the Mail-SNCF CPAN distribution.

Report information
The Basics
Id: 55128
Status: new
Priority: 0/
Queue: Mail-SNCF

People
Owner: Nobody in particular
Requestors: BARBIE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.02
Fixed in: (no value)



Subject: Fixes for CPAN Testers FAIL reports (& doc fixes)
The CPAN Testers are currently reporting this distribution with a FAIL due to the differing locales used when matching the dates in test output. This patch includes fixes to ignore the date pattern, and ensure all other text formats correctly. In addition it also includes documentation patches, adds a missing dependency and the includes skips for tests not required during user installation.
Subject: mail-sncf-fixes.patch
--- Mail-SNCF/Mail-SNCF-0.02/Changes Thu Mar 26 16:15:32 2009 +++ Mail-SNCF/Mail-SNCF-0.02_01/Changes Mon Mar 1 17:11:31 2010 @@ -1,5 +1,13 @@ Revision history for Mail::SNCF +0.02_01 01/03/2010 + - Changes by Barbie + - added missing 'MIME::QuotedPrint' dependency. + - updated documentation + - relaxed date matching in text.t, as this can depend on locale + - simplified sncf-parse and added usage statement + - added skips for pod tests, as not required during installation. + 0.011 26/03 Now it's called Mail::SNCF instead of SNCF --- Mail-SNCF/Mail-SNCF-0.02/lib/Mail/SNCF.pm Thu Jun 11 10:04:14 2009 +++ Mail-SNCF/Mail-SNCF-0.02_01/lib/Mail/SNCF.pm Mon Mar 1 13:57:27 2010 @@ -115,6 +115,10 @@ dump($self); } +1; # End of Mail::SNCF + +__END__ + =head1 AUTHOR Olivier Schwander, C<< <iderrick at cpan.org> >> @@ -164,4 +168,3 @@ =cut --- Mail-SNCF/Mail-SNCF-0.02/lib/Mail/SNCF/ICal.pm Thu Apr 2 08:49:43 2009 +++ Mail-SNCF/Mail-SNCF-0.02_01/lib/Mail/SNCF/ICal.pm Mon Mar 1 14:02:03 2010 @@ -26,9 +26,9 @@ This backend produces an output suitable for ICal based programs. - use Mail::SNCF; + use Mail::SNCF::ICal; - my $foo = Mail::SNCF::Text->parse("Mail/sncf"); + my $foo = Mail::SNCF::ICal->parse("Mail/sncf"); my $s = $foo->as_string; $foo->print; @@ -89,6 +89,11 @@ return $self; } + +1; # End of Mail::SNCF::ICal + +__END__ + =head1 AUTHOR Olivier Schwander, C<< <iderrick at cpan.org> >> @@ -128,10 +133,8 @@ =back - =head1 ACKNOWLEDGEMENTS - =head1 COPYRIGHT & LICENSE Copyright 2009 Olivier Schwander, all rights reserved. @@ -139,7 +142,4 @@ This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. - =cut - --- Mail-SNCF/Mail-SNCF-0.02/lib/Mail/SNCF/Remind.pm Thu Mar 26 16:22:25 2009 +++ Mail-SNCF/Mail-SNCF-0.02_01/lib/Mail/SNCF/Remind.pm Mon Mar 1 14:02:03 2010 @@ -25,9 +25,9 @@ This backend produces an output suitable for remind (L<http://www.roaringpenguin.com/products/remind>) - use Mail::SNCF; + use Mail::SNCF::Remind; - my $foo = Mail::SNCF::Text->parse("Mail/sncf"); + my $foo = Mail::SNCF::Remind->parse("Mail/sncf"); my $s = $foo->as_string; $foo->print; @@ -80,6 +80,10 @@ return $string; } +1; # End of Mail::SNCF::Remind + +__END__ + =head1 AUTHOR Olivier Schwander, C<< <iderrick at cpan.org> >> @@ -119,10 +123,8 @@ =back - =head1 ACKNOWLEDGEMENTS - =head1 COPYRIGHT & LICENSE Copyright 2009 Olivier Schwander, all rights reserved. @@ -130,7 +132,4 @@ This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. - =cut - --- Mail-SNCF/Mail-SNCF-0.02/lib/Mail/SNCF/Text.pm Thu Mar 26 16:22:28 2009 +++ Mail-SNCF/Mail-SNCF-0.02_01/lib/Mail/SNCF/Text.pm Mon Mar 1 14:02:03 2010 @@ -24,7 +24,7 @@ This backend produces a pretty text output. - use Mail::SNCF; + use Mail::SNCF::Text; my $foo = Mail::SNCF::Text->parse("Mail/sncf"); my $s = $foo->as_string; @@ -79,6 +79,10 @@ return $string; } +1; # End of Mail::SNCF::Text + +__END__ + =head1 AUTHOR Olivier Schwander, C<< <iderrick at cpan.org> >> @@ -118,10 +122,8 @@ =back - =head1 ACKNOWLEDGEMENTS - =head1 COPYRIGHT & LICENSE Copyright 2009 Olivier Schwander, all rights reserved. @@ -129,7 +131,4 @@ This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. - =cut - --- Mail-SNCF/Mail-SNCF-0.02/Makefile.PL Fri Apr 24 13:07:17 2009 +++ Mail-SNCF/Mail-SNCF-0.02_01/Makefile.PL Mon Mar 1 13:58:54 2010 @@ -10,6 +10,7 @@ requires 'DateTime' => 0; requires 'Email::Folder' => 0; requires 'Data::Dump' => 0; +requires 'MIME::QuotedPrint' => 0; test_requires 'Test::More' => '0.42'; --- Mail-SNCF/Mail-SNCF-0.02/META.yml Thu Jun 11 10:06:36 2009 +++ Mail-SNCF/Mail-SNCF-0.02_01/META.yml Mon Mar 1 13:58:51 2010 @@ -24,6 +24,7 @@ Date::ICal: 0 DateTime: 0 Email::Folder: 0 + MIME::QuotedPrint: 0 resources: license: http://dev.perl.org/licenses/ --- Mail-SNCF/Mail-SNCF-0.02/script/sncf-parse Thu Mar 26 16:23:38 2009 +++ Mail-SNCF/Mail-SNCF-0.02_01/script/sncf-parse Mon Mar 1 16:21:07 2010 @@ -9,36 +9,28 @@ use Mail::SNCF::Text; use Mail::SNCF::Remind; -my $ical; -my $text; -my $remind; -my $file; +my ($ical,$text,$remind,$file); GetOptions( "c|ical" => \$ical, "t|text" => \$text, "r|remind" => \$remind, - "o|outfile=s" => \$file, - ); + "o|outfile=s" => \$file, +) or usage(); my $mailbox = shift; -my $sncf; -if ($ical) { - $sncf = Mail::SNCF::ICal->parse($mailbox); -} -else { - if ($remind) { - $sncf = Mail::SNCF::Remind->parse($mailbox); - } - else { - $sncf = Mail::SNCF::Text->parse($mailbox); - } -} +my $sncf = $ical ? Mail::SNCF::ICal->parse($mailbox) : + $remind ? Mail::SNCF::Remind->parse($mailbox) : + Mail::SNCF::Text->parse($mailbox); + if (defined($file)) { $sncf->file($file); -} -else { +} else { $sncf->print; } +sub usage { + print "Usage: $0 (-c | -t | -r) [-o=<file>] <mailfile>\n"; + exit; --- Mail-SNCF/Mail-SNCF-0.02/t/pod-coverage.t Thu Mar 26 16:25:34 2009 +++ Mail-SNCF/Mail-SNCF-0.02_01/t/pod-coverage.t Mon Mar 1 16:23:11 2010 @@ -2,6 +2,10 @@ use warnings; use Test::More; +# Skip if doing a regular install +plan skip_all => "Author tests not required for installation" + unless ( $ENV{AUTOMATED_TESTING} ); + # Ensure a recent version of Test::Pod::Coverage my $min_tpc = 1.08; eval "use Test::Pod::Coverage $min_tpc"; @@ -16,3 +20,4 @@ if $@; all_pod_coverage_ok(); --- Mail-SNCF/Mail-SNCF-0.02/t/pod.t Thu Mar 26 12:34:32 2009 +++ Mail-SNCF/Mail-SNCF-0.02_01/t/pod.t Mon Mar 1 16:23:11 2010 @@ -4,6 +4,10 @@ use warnings; use Test::More; +# Skip if doing a regular install +plan skip_all => "Author tests not required for installation" + unless ( $ENV{AUTOMATED_TESTING} ); + # Ensure a recent version of Test::Pod my $min_tp = 1.22; --- Mail-SNCF/Mail-SNCF-0.02/t/text.t Thu Mar 26 16:26:40 2009 +++ Mail-SNCF/Mail-SNCF-0.02_01/t/text.t Mon Mar 1 17:10:30 2010 @@ -7,10 +7,17 @@ my @lines = <DATA>; my $output = join("", @lines); +$output =~ s/([\w\x20-\x7E\xA0-\xFF]{3}\s+\d{1,2},?\s+\d{4})/<DATE>/sig; +$output =~ s/(\d{1,2}\s+[\w\x20-\x7E\xA0-\xFF]{3}\s+\d{4})/<DATE>/sig; + my $file = "t/sncf"; my $sncf = Mail::SNCF::Text->parse($file); +my $sncf_string = $sncf->as_string; -is($sncf->as_string, $output, "Text output works"); +$sncf_string =~ s/([\w\x20-\x7E\xA0-\xFF]{3}\s+\d{1,2},?\s+\d{4})/<DATE>/sig; +$sncf_string =~ s/(\d{1,2}\s+[\w\x20-\x7E\xA0-\xFF]{3}\s+\d{4})/<DATE>/sig; + +is($sncf_string, $output, "Text output works"); __DATA__