gray > WWW-Spamla-0.04 > WWW::Spamla

Download:
WWW-Spamla-0.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.04   Source  

NAME ^

WWW::Spamla - interface to Spam.la

SYNOPSIS ^

    my $la = WWW::Spamla->new;

    my @list = $la->list( address => 'bubba' );

    for my $item (@list) {
        printf "%d: %s - %s\n", $item->id, $item->from, $item->subject;

        if ( $subject =~ /account/ ) {
            my $msg = $la->message( $item->id );
            my $parsed = Email::MIME->new( $msg );
            # ...
        }
    }

DESCRIPTION ^

The WWW::Spamla module provides an interface to the Spam.la website.

METHODS ^

$la = WWW::Spamla->new
$la = WWW::Spamla->new( ua => $ua )

Creates a new WWW::Spamla object. The constructor accepts an optional LWP::UserAgent derived object.

@list = $la->list
@list = $la->list( address => $address, start_id => $id )

Returns a list of the 20 latest messages. The list can optionally be started from a specific id, and filtered by address. Returns undef if an error occurred. The return list consists of objects of type WWW::Spam::ListItem, which provide accessors to data id, to, from, subject.

@message = $la->message( $id )

Given a message id, fetches and returns the corresponding MIME message. It can then be parsed by any MIME handler, like Email::MIME or MIME::Parser. Returns undef if an error occurred.

$error = $la->error

Returns the error, if one occurred.

SEE ALSO ^

http://spam.la/

REQUESTS AND BUGS ^

Please report any bugs or feature requests to http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Spamla. 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 WWW::Spamla

You can also look for information at:

COPYRIGHT AND LICENSE ^

Copyright (C) 2007 gray <gray at cpan.org>, all rights reserved.

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

AUTHOR ^

gray, <gray at cpan.org>