FTN::Crypt::Msg - Message parsing for the FTN::Crypt module.
use FTN::Crypt::Msg; my $obj = FTN::Crypt::Msg->new( Address => $ftn_address, Message => $msg, ); $obj->add_kludge('ENC: PGP5'); $obj->remove_kludge('ENC'); my $text = $obj->get_text; my $kludges = $obj->get_kludges; my $msg = $obj->get_message;
Constructor.
Address: Recipient's FTN address.
Address
Message: FTN message text with kludges.
Message
Created object or error in FTN::Crypt::Msg->error.
FTN::Crypt::Msg->error
Sample:
my $obj = FTN::Crypt::Msg->new( Address => $ftn_address, Message => $msg, ) or die FTN::Crypt::Msg->error;
Add kludge to the message.
Kludge string.
Optional [TOP|BOTTOM|<index]> Kludges block, defaults to TOP.
[TOP|BOTTOM|<index
True or error in $obj->error.
$obj->error
$obj->add_kludge('ENC: PGP5') or die $obj->error;
Remove kludge from the message.
Kludge string, may be only the first part of the composite kludge.
$obj->remove_kludge('ENC') or die $obj->error;
Get message kludges.
None.
Arrayref with kludges list or error in $obj->error.
$obj->get_kludges() or die $obj->error;
Get recipient's FTN address.
Recipient's FTN address or error in $obj->error.
my $ftn_address = $obj->get_address() or die $obj->error;
Set recipient's FTN address.
Recipient's FTN address.
$obj->set_address($ftn_address)
Get text part of the message.
Optional [TOP|BOTTOM|<index]> Text block, defaults to BOTTOM.
Text part of the message or error in $obj->error.
my $text = $obj->get_text() or die $obj->error;
Get all text parts of the message.
Arrayref with text parts of the message or error in $obj->error.
my $text = $obj->get_all_text() or die $obj->error;
Set text part of the message.
Text part of the message.
$obj->set_text($text) or die $obj->error;
Get FTN message text with kludges.
FTN message text with kludges or error in $obj->error.
my $msg = $obj->get_message() or die $obj->error;
Set FTN message text with kludges.
FTN message text with kludges.
$obj->set_message($msg) or die $obj->error;
Petr Antonov, <pietro@cpan.org>
Copyright (C) 2019 by Petr Antonov
This library is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses at https://opensource.org/licenses/Artistic-1.0, and http://www.gnu.org/licenses/gpl-2.0.html.
This package is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose.
To install FTN::Crypt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FTN::Crypt
CPAN shell
perl -MCPAN -e shell install FTN::Crypt
For more information on module installation, please visit the detailed CPAN module installation guide.