The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

FTN::Packet - Reading or writing Fidonet Technology Networks (FTN) packets.

VERSION

VERSION 0.09

DESCRIPTION

FTN::Packet is a Perl extension for reading or writing Fidonet Technology Networks (FTN) packets.

EXPORT

The following functions are available in this module: read_ftn_packet(), write_ftn_packet().

FUNCTIONS

read_ftn_packet

Syntax: $messages = read_ftn_packet(*PKT);

Read a Fidonet/FTN packet. Returns the messages in the packet as a reference to an array of hash references, which can be read as follows:

    $message_ref = pop(@{$messages});
    $msg_area = ${$message_ref}->('area');
    $msg_date = ${$message_ref}->('ftnscdate');
    $msg_tonode = ${$message_ref}->('tonode');
    $msg_from = ${$message_ref}->('from');
    $msg_body = ${$message_ref}->('to');
    $msg_subj = ${$message_ref}->('subj');
    $msg_msgid = ${$message_ref}->('msgid');
    $msg_replyid = ${$message_ref}->('replyid');
    $msg_body = ${$message_ref}->('body');
    $msg_ctrl = ${$message_ref}->('ctrlinfo');

write_ftn_packet

Syntax: write_ftn_packet($OutDir, \%packet_info, \@messages);

Create a Fidonet/FTN packet, where: $OutDir is the directory where the packet is to be created \%packet_info is a reference to a hash containing the packet header \@messages is reference to an array of references to hashes containing the messages.

EXAMPLES

  use FTN:Packet;
  To be added...

AUTHORS

Robert James Clay, jame@rocasa.us

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 airneil@users.sf.net and Robert James Clay jame@rocasa.us available at the 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.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc FTN::Packet

SEE ALSO

 L<perl(1)>

COPYRIGHT & LICENSE

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 under the same terms as Perl itself.