The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

FTN::JAM - A Perl extension for handleing JAM messagebases.

VERSION

Version 0.30

SYNOPSIS

This module can be used for operations related to JAM messagebases, including the following: creating or removing a messagebase, listing the contents of a messagebase, adding a message to a messagebase, reading a message in a messagebase, changing a message in a messagebase, or finding a user in a messagebase.

Here is an example of how it can being used:

    use FTN::JAM;

    my $mb = $ARGV[0];
    my $basemsgnum = $ARGV[1];

    my $handle = FTN::JAM::CreateMB($mb,$basemsgnum);

    FTN::JAM::CloseMB($handle);
    ...

EXPORT

The following functions are available in the module: OpenMB, CreateMB, CloseMB, RemoveMB, LockMB, UnlockMB, ReadMBHeader, WriteMBHeader, GetMBSize, ReadMessage, ChangeMessage, AddMessage, Crc32, FindUser, GetLastRead, SetLastRead, TimeToLocal, and LocalToTime.

The global variable $Errnum is used for returning error numbers from functions and can be accessed as $FTN::JAM::Errnum. It defaults to undefined.

FUNCTIONS

OpenMB

Syntax: $handle = FTN::JAM::OpenMB($jampath)

CreateMB

Syntax: $handle = FTN::JAM::CreateMB($jampath,$basemsg)

CloseMB

Syntax: FTN::JAM::CloseMB($handle)

RemoveMB

Syntax: FTN::JAM::RemoveMB($jampath)

LockMB

Syntax: $success = FTN::JAM::LockMB($handle,$timeout)

UnlockMB

Syntax: FTN::JAM::UnlockMB($handle)

ReadMBHeader

Syntax: $success = FTN::JAM::ReadMBHeader($handle,\%header)

WriteMBHeader

Syntax: $success = FTN::JAM::WriteMBHeader($handle,\%header)

GetMBSize

Syntax: $success = FTN::JAM::GetMBSize($handle,\$num)

ReadMessage

Syntax: $success = FTN::JAM::ReadMessage($handle,$msgnum,\%header,\@subfields,\$text)

ChangeMessage

Syntax: $success = FTN::JAM::ChangeMessage($handle,$msgnum,\%header)

AddMessage

Syntax: $success = FTN::JAM::AddMessage($handle,\%header,\@subfields,\$text)

Crc32

Syntax: $crc32 = FTN::JAM::Crc32($data)

FindUser

Syntax: $msgnum = FTN::JAM::FindUser($handle,$usercrc,$start)

GetLastRead

Syntax: $success = FTN::JAM::GetLastRead($handle,$usernum,\%lastread)

SetLastRead

Syntax: $success = FTN::JAM::SetLastRead($handle,$usernum,/%lastread)

TimeToLocal

Syntax $local = FTN::JAM::TimeToLocal($time)

LocalToTime

Syntax $time = FTN::JAM::LocalToTime($local)

AUTHOR

Robert James Clay, <jame at rocasa.us>

BUGS

Please report any bugs or feature requests to bug-ftn-jam at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ftn-jam. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

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

    perldoc FTN::JAM

You can also look for information at:

ACKNOWLEDGEMENTS

Originally based on the public domain Perl::JAM module by Johan Billing, which can be found at https://bitbucket.org/johanbilling/jampm/overview.

SEE ALSO

 L<FTN::JAM>, L<FTN::JAM::Examples>

COPYRIGHT & LICENSE

Copyright 2010-2012 Robert James Clay, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.