[Ftnpl-cvs] SF.net SVN: ftnpl:[617] trunk/modules/FTN/Packet
Brought to you by:
jame
|
From: <ja...@us...> - 2011-07-15 17:13:23
|
Revision: 617
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=617&view=rev
Author: jame
Date: 2011-07-15 17:13:12 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
FTN::Packet v0.09
Merge branch 'develop'
* develop:
Changes for version v0.09
Moved updated TODO file to doc source directory.
Add .gitignore file to source directory.
Moved updated TODO file to doc source directory.
Change how Author copyright years is listed.
Change Author email being used to ja...@ro...
Change to using the TEST modules for testing.
Updated the Makefile.pl file by adding items.
Modified Paths:
--------------
trunk/modules/FTN/Packet/Changes
trunk/modules/FTN/Packet/MANIFEST
trunk/modules/FTN/Packet/Makefile.PL
trunk/modules/FTN/Packet/README
trunk/modules/FTN/Packet/lib/FTN/Packet.pm
Added Paths:
-----------
trunk/modules/FTN/Packet/.gitignore
trunk/modules/FTN/Packet/doc/
trunk/modules/FTN/Packet/doc/TODO
trunk/modules/FTN/Packet/t/00-load.t
trunk/modules/FTN/Packet/t/boilerplate.t
trunk/modules/FTN/Packet/t/pod-coverage.t
trunk/modules/FTN/Packet/t/pod.t
Removed Paths:
-------------
trunk/modules/FTN/Packet/TODO
trunk/modules/FTN/Packet/t/test.pl
Added: trunk/modules/FTN/Packet/.gitignore
===================================================================
--- trunk/modules/FTN/Packet/.gitignore (rev 0)
+++ trunk/modules/FTN/Packet/.gitignore 2011-07-15 17:13:12 UTC (rev 617)
@@ -0,0 +1,11 @@
+blib*
+Makefile
+Makefile.old
+Build
+_build*
+pm_to_blib*
+*.tar.gz
+.lwpcookies
+FTN-Packet-*
+cover_db
+
\ No newline at end of file
Modified: trunk/modules/FTN/Packet/Changes
===================================================================
--- trunk/modules/FTN/Packet/Changes 2011-07-15 17:13:00 UTC (rev 616)
+++ trunk/modules/FTN/Packet/Changes 2011-07-15 17:13:12 UTC (rev 617)
@@ -1,5 +1,13 @@
Revision history for Perl extension FTN::Packet
+0.09 Sun Sep 05 2010
+ - Change to using the TEST modules for testing.
+ - Change how Author copyright years is listed.
+ - Moved updated TODO file to doc source directory.
+ - Change the Author email being used to ja...@ro....
+ - Updated Makefile.pl; adding items for AUTHOR, ABSTRACT_FROM, LICENSE,
+ dist, & clean.
+
0.08 Sun Dec 21 2008
- Do some clean up of usage and naming of variables, as well as to the
documentation.
Modified: trunk/modules/FTN/Packet/MANIFEST
===================================================================
--- trunk/modules/FTN/Packet/MANIFEST 2011-07-15 17:13:00 UTC (rev 616)
+++ trunk/modules/FTN/Packet/MANIFEST 2011-07-15 17:13:12 UTC (rev 617)
@@ -4,4 +4,6 @@
lib/FTN/Packet.pm
README
TODO
-t/test.pl
+t/00-load.t
+t/pod-coverage.t
+t/pod.t
Modified: trunk/modules/FTN/Packet/Makefile.PL
===================================================================
--- trunk/modules/FTN/Packet/Makefile.PL 2011-07-15 17:13:00 UTC (rev 616)
+++ trunk/modules/FTN/Packet/Makefile.PL 2011-07-15 17:13:12 UTC (rev 617)
@@ -2,6 +2,16 @@
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
- 'NAME' => 'FTN::Packet',
- 'VERSION_FROM' => 'lib/FTN/Packet.pm', # finds $VERSION
+ NAME => 'FTN::Packet',
+ AUTHOR => 'Robert James Clay <ja...@ro...>',
+ VERSION_FROM => 'lib/FTN/Packet.pm',
+ ABSTRACT_FROM => 'lib/FTN/Packet.pm',
+ LICENSE => 'perl',
+ PREREQ_PM => {
+ 'Test::More' => 0,
+ 'Test::Pod' => 1.22,
+ 'Test::Pod::Coverage' => 1.08
+ },
+ dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+ clean => { FILES => 'FTN-Packet-*' },
);
Modified: trunk/modules/FTN/Packet/README
===================================================================
--- trunk/modules/FTN/Packet/README 2011-07-15 17:13:00 UTC (rev 616)
+++ trunk/modules/FTN/Packet/README 2011-07-15 17:13:12 UTC (rev 617)
@@ -1,6 +1,6 @@
FTN::Packet
-Copyright (c) 2001-2004,2006,2008 Robert James Clay. All Rights Reserved.
+Copyright (c) 2001-2010 Robert James Clay. All Rights Reserved.
This is free software; you can redistribute it and/or
mnodify it under the same terms as Perl itself.
@@ -26,5 +26,5 @@
R.J. Clay ("Jame")
- Robert J. Clay, ja...@us...
+ Robert J. Clay, ja...@ro...
Sysop, 1:120/544, 1:120/545
Deleted: trunk/modules/FTN/Packet/TODO
===================================================================
--- trunk/modules/FTN/Packet/TODO 2011-07-15 17:13:00 UTC (rev 616)
+++ trunk/modules/FTN/Packet/TODO 2011-07-15 17:13:12 UTC (rev 617)
@@ -1,14 +0,0 @@
-To do: FTN:Packet
-
- write_ftn_packet()
-- When doing, for instance, two messages: the two messages are making it into
-the packets but they're both the text of the second message.
-- Also the serial number for the MSGID is coming up as the same for both. When
-code a better way of getting a 8 char serial number to use, add it as a function
-to the module?
-
- read_ftn_packet()
-- Change the name of the appropriate fields in the packet related hashes to being
-named after how they are named in the fts-0001 documentation.
-
-
\ No newline at end of file
Added: trunk/modules/FTN/Packet/doc/TODO
===================================================================
--- trunk/modules/FTN/Packet/doc/TODO (rev 0)
+++ trunk/modules/FTN/Packet/doc/TODO 2011-07-15 17:13:12 UTC (rev 617)
@@ -0,0 +1,33 @@
+To do: FTN:Packet
+
+- Reorganize the functions, so that instead of a read and a write packet
+function; there are functions to open and close the packet file being read or
+written, reading or writing the packet header are separate functions, and then
+reading or writing the messsages to or from a packet file are also separate
+functions?
+- Also add other functions as neccessary: one for generating a serial number,
+one for generating a name for a standard packet file, one for generating an
+ftsc standard date.
+- Add reference to ftsc documentation and/or to the ftsc web site.
+
+ write_ftn_packet()
+- When doing, for instance, two messages: two messages are making it into
+the packets but they're both the text of the second message.
+- Also the serial number for the MSGID is coming up as the same for both.
+When code a better way of getting a 8 char serial number to use, add it as a
+function to the module?
+- The write up and variable usages for the packet format per FTS-0001 could
+be rewritten to more closely match the current documentation, esp. the listed
+order.
+- Change the name of the appropriate fields in the packet related hashes to
+being named after how they are named in the FTS-0001 documentation.
+
+ read_ftn_packet()
+- Change the name of the appropriate fields in the packet related hashes to
+being named after how they are named in the fts-0001 documentation.
+- The zone number information is not being pulled what is available in the
+packet; needed to set the from_node & to_node variables instead of assuming
+zone 1. It is in the packet header (being skipped in the current code) instead
+of in the message header. Or could use the zone number from the message id if
+available.
+
\ No newline at end of file
Modified: trunk/modules/FTN/Packet/lib/FTN/Packet.pm
===================================================================
--- trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:13:00 UTC (rev 616)
+++ trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:13:12 UTC (rev 617)
@@ -9,11 +9,11 @@
=head1 VERSION
-VERSION 0.08
+VERSION 0.09
=cut
-$VERSION = '0.08';
+$VERSION = '0.09';
=head1 DESCRIPTION
@@ -388,13 +388,13 @@
=head1 AUTHORS
-Robert James Clay, ja...@us...
+Robert James Clay, ja...@ro...
=head1 ACKNOWLEDGEMENTS
Code for the read_ftn_packet function was initially derived from the newmsgs subroutine
in the set of scripts for reading FTN packets (pkt2txt.pl, pkt2xml.pl, etc) by
-Russ Johnson L<ai...@us...> and Robert James Clay L<ja...@us...>
+Russ Johnson L<ai...@us...> and Robert James Clay L<ja...@ro...>
available at the L<http://ftnpl.sourceforge.net>] project site. Initial code for
the write_ftn_packet function was derived from the bbs2pkt.pl of v0.1 of the bbsdbpl
scripts, also at the SourceForge project.
@@ -411,7 +411,7 @@
=head1 COPYRIGHT & LICENSE
-Copyright 2001-2004,2006,2008 Robert James Clay, all rights reserved.
+Copyright 2001-2010 Robert James Clay, all rights reserved.
Copyright 2001-2003 Russ Johnson, all rights reserved.
This program is free software; you can redistribute it and/or modify it
Added: trunk/modules/FTN/Packet/t/00-load.t
===================================================================
--- trunk/modules/FTN/Packet/t/00-load.t (rev 0)
+++ trunk/modules/FTN/Packet/t/00-load.t 2011-07-15 17:13:12 UTC (rev 617)
@@ -0,0 +1,9 @@
+#!perl -T
+
+use Test::More tests => 2;
+
+BEGIN {
+ use_ok( 'FTN::Packet' );
+}
+
+diag( "Testing FTN::Packet $FTN::Packet::VERSION, Perl $], $^X" );
Added: trunk/modules/FTN/Packet/t/boilerplate.t
===================================================================
--- trunk/modules/FTN/Packet/t/boilerplate.t (rev 0)
+++ trunk/modules/FTN/Packet/t/boilerplate.t 2011-07-15 17:13:12 UTC (rev 617)
@@ -0,0 +1,54 @@
+#!perl -T
+
+use strict;
+use warnings;
+use Test::More tests => 4;
+
+sub not_in_file_ok {
+ my ($filename, %regex) = @_;
+ open( my $fh, '<', $filename )
+ or die "couldn't open $filename for reading: $!";
+
+ my %violated;
+
+ while (my $line = <$fh>) {
+ while (my ($desc, $regex) = each %regex) {
+ if ($line =~ $regex) {
+ push @{$violated{$desc}||=[]}, $.;
+ }
+ }
+ }
+
+ if (%violated) {
+ fail("$filename contains boilerplate text");
+ diag "$_ appears on lines @{$violated{$_}}" for keys %violated;
+ } else {
+ pass("$filename contains no boilerplate text");
+ }
+}
+
+sub module_boilerplate_ok {
+ my ($module) = @_;
+ not_in_file_ok($module =>
+ 'the great new $MODULENAME' => qr/ - The great new /,
+ 'boilerplate description' => qr/Quick summary of what the module/,
+ 'stub function definition' => qr/function[12]/,
+ );
+}
+
+TODO: {
+ local $TODO = "Need to replace the boilerplate text";
+
+ not_in_file_ok(README =>
+ "The README is used..." => qr/The README is used/,
+ "'version information here'" => qr/to provide version information/,
+ );
+
+ not_in_file_ok(Changes =>
+ "placeholder date/time" => qr(Date/time)
+ );
+
+ module_boilerplate_ok('lib/FTN/Packet.pm');
+
+}
+
Added: trunk/modules/FTN/Packet/t/pod-coverage.t
===================================================================
--- trunk/modules/FTN/Packet/t/pod-coverage.t (rev 0)
+++ trunk/modules/FTN/Packet/t/pod-coverage.t 2011-07-15 17:13:12 UTC (rev 617)
@@ -0,0 +1,18 @@
+use strict;
+use warnings;
+use Test::More;
+
+# Ensure a recent version of Test::Pod::Coverage
+my $min_tpc = 1.08;
+eval "use Test::Pod::Coverage $min_tpc";
+plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
+ if $@;
+
+# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
+# but older versions don't recognize some common documentation styles
+my $min_pc = 0.18;
+eval "use Pod::Coverage $min_pc";
+plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
+ if $@;
+
+all_pod_coverage_ok();
Added: trunk/modules/FTN/Packet/t/pod.t
===================================================================
--- trunk/modules/FTN/Packet/t/pod.t (rev 0)
+++ trunk/modules/FTN/Packet/t/pod.t 2011-07-15 17:13:12 UTC (rev 617)
@@ -0,0 +1,12 @@
+#!perl -T
+
+use strict;
+use warnings;
+use Test::More;
+
+# Ensure a recent version of Test::Pod
+my $min_tp = 1.22;
+eval "use Test::Pod $min_tp";
+plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;
+
+all_pod_files_ok();
Deleted: trunk/modules/FTN/Packet/t/test.pl
===================================================================
--- trunk/modules/FTN/Packet/t/test.pl 2011-07-15 17:13:00 UTC (rev 616)
+++ trunk/modules/FTN/Packet/t/test.pl 2011-07-15 17:13:12 UTC (rev 617)
@@ -1,20 +0,0 @@
-# Before `make install' is performed this script should be runnable with
-# `make test'. After `make install' it should work as `perl test.pl'
-
-######################### We start with some black magic to print on failure.
-
-# Change 1..1 below to 1..last_test_to_print .
-# (It may become useful if the test is moved to ./t subdirectory.)
-
-BEGIN { $| = 1; print "1..1\n"; }
-END {print "not ok 1\n" unless $loaded;}
-use Packet;
-$loaded = 1;
-print "ok 1\n";
-
-######################### End of black magic.
-
-# Insert your test code below (better if it prints "ok 13"
-# (correspondingly "not ok 13") depending on the success of chunk 13
-# of the test code):
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|