[Ftnpl-cvs] SF.net SVN: ftnpl:[620] trunk/modules/FTN/Packet
Brought to you by:
jame
|
From: <ja...@us...> - 2011-07-15 17:13:44
|
Revision: 620
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=620&view=rev
Author: jame
Date: 2011-07-15 17:13:33 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
FTN::Packet v0.12
* develop:
Changes for version v0.12
Correct grep line number 355 in Packet.pm
Set scope for ISA, EXPORT, and EXPORT_OK in Packet.pm
Correct line for TODO file in MANIFEST.
Some cleanup of white space and comments in Packet.pm.
Bump version to v0.12
Modified Paths:
--------------
trunk/modules/FTN/Packet/Changes
trunk/modules/FTN/Packet/MANIFEST
trunk/modules/FTN/Packet/lib/FTN/Packet.pm
Modified: trunk/modules/FTN/Packet/Changes
===================================================================
--- trunk/modules/FTN/Packet/Changes 2011-07-15 17:13:25 UTC (rev 619)
+++ trunk/modules/FTN/Packet/Changes 2011-07-15 17:13:33 UTC (rev 620)
@@ -1,5 +1,11 @@
Revision history for Perl extension FTN::Packet
+0.12 Mon Jul 11 2011 17:11
+ - Correct line for TODO file in MANIFEST.
+ - Correct grep line number 355 in Packet.pm.
+ - Set scope for ISA, EXPORT, and EXPORT_OK in Packet.pm.
+ - Some cleanup of white space and comments in Packet.pm.
+
0.11 Mon Jul 11 2011 15:26
- Correct POD email links in Packet.pm.
- Rewrite grep at line 356 in Packet.pm.
Modified: trunk/modules/FTN/Packet/MANIFEST
===================================================================
--- trunk/modules/FTN/Packet/MANIFEST 2011-07-15 17:13:25 UTC (rev 619)
+++ trunk/modules/FTN/Packet/MANIFEST 2011-07-15 17:13:33 UTC (rev 620)
@@ -3,7 +3,7 @@
Makefile.PL
lib/FTN/Packet.pm
README
-TODO
+doc/TODO
t/00-load.t
t/pod-coverage.t
t/pod.t
Modified: trunk/modules/FTN/Packet/lib/FTN/Packet.pm
===================================================================
--- trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:13:25 UTC (rev 619)
+++ trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:13:33 UTC (rev 620)
@@ -31,13 +31,13 @@
=cut
-@ISA = qw(Exporter AutoLoader);
+our @ISA = qw(Exporter AutoLoader);
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
-@EXPORT = qw(
+our @EXPORT = qw(
);
-@EXPORT_OK = qw( &read_ftn_packet &write_ftn_packet
+our @EXPORT_OK = qw( &read_ftn_packet &write_ftn_packet
);
=head1 FUNCTIONS
@@ -133,7 +133,7 @@
$area =~ s/.*://;
# Force upper case ???
- $area =~ tr/a-z/A-Z/;
+ $area =~ tr/a-z/A-Z/;
@kludges = ();
@@ -168,8 +168,8 @@
@lines = ("[empty message]");
}
- # get message body
- $message_body = ""; # ensure that it starts empty
+ # get message body, ensuring that it starts empty
+ $message_body = "";
foreach my $s (@lines) {
$s =~ tr/\0-\037/\040-\100/;
@@ -181,14 +181,14 @@
$message_body .= "$mailer\n" if ($mailer);
$message_body .= " * Origin: $origin\n" if ($origin);
- # get control info
- my $control_info = ""; # ensure that it starts empty
+ # get control info, ensuring that it starts empty
+ my $control_info = "";
$control_info .= "$seen_by\n" if ($seen_by);
foreach my $c (@kludges) {
$c =~ s/^\001//;
# If kludge starts with "MSGID:", stick that in a special
- # variable.
+ # variable.
if ( substr($c, 0, 6) eq "MSGID:" ) {
$message_id = substr($c, 7);
}
@@ -321,15 +321,14 @@
# PKT name as per FTS
($seconds, $minutes, $hour, $day, $month, $year) = localtime();
$year += 1900;
- # does the above actually give a two digit year?
- # the original above was 1900 instead of 2000
+
$packet_file = sprintf("%s/%02d%02d%02d%02d.pkt",$OutDir,$day,$hour,$minutes,$seconds);
open( $PKT, q{>}, "$packet_file" ) || die;
binmode($PKT);
- # write packet header
+ # write packet header
$buffer = pack("SSSSSSSSSSSSSa8SSSSSSSSSSL",
${$packet_info}{OrgNode}, ${$packet_info}{DestNode},
$year, $month, $day, $hour, $minutes, $seconds,
@@ -353,7 +352,7 @@
# get text body, translate LFs to CRs
@lines = ${$message_ref}{Body};
- grep { s/\n/\r/ }, @lines;
+ @lines = grep { s/\n/\r/ } @lines;
# kill leading blank lines
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|