Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Programming > Perl Modules

    Messaging::Message 1.2

    Download button

    No screenshots available
    Downloads: 89  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Lionel Cons | More programs
    Perl Artistic License / FREE
    May 1st, 2012, 19:54 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Messaging::Message description

    Abstraction of a message

    Messaging::Message is a Perl module that provides an abstraction of a "message", as used in messaging, see for instance: http://en.wikipedia.org/wiki/Enterprise_messaging_system.

    A message consists of header fields (collectively called "the header of the message") and a body.

    Each header field is a key/value pair where the key and the value are text strings. The key is unique within the header so we can use a hash table to represent the header of the message.

    The body is either a text string or a binary string. This distinction is needed because text may need to be encoded (for instance using UTF-8) before being stored on disk or sent across the network.

    To make things clear:

    - a text string (aka character string) is a sequence of Unicode characters
    - a binary string (aka byte string) is a sequence of bytes

    Both the header and the body can be empty.

    SYNOPSIS

     use Messaging::Message;

     # constructor + setters
     $msg = Messaging::Message->new();
     $msg->body("hello world");
     $msg->header({ subject => "test" });
     $msg->header_field("message-id", 123);

     # fancy constructor
     $msg = Messaging::Message->new(
     body => "hello world",
     header => {
     "subject" => "test",
     "message-id" => 123,
     },
     );

     # getters
     if ($msg->body() =~ /something/) {
     ...
     }
     $id = $msg->header_field("message-id");



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    message abstraction | Perl module | Perl | message | abstraction



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM