Acme-PIA-Export
view release on metacpan or search on metacpan
package Acme::PIA::Export;
our $VERSION = "0.019";
use IO::Socket;
=pod
=head1 NAME
Acme::PIA::Export - Export contacts, calendars or todos from Arcor's PIA messaging
=head1 DESCRIPTION
This module is intended to help export data from the PIA messaging web application
that comes with the free Arcor mail account at www.arcor.de
It lets the user retrieve his data in CSV or XLS (not yet implemented) format or
as hashes.
If you don't know what PIA is, you will most probably not need this module.
=head2 EXAMPLE
use Acme::PIA::Export;
my $pia = Acme::PIA::Export->new(
"username" => "mylogin",
"password" => "verysecret"
);
$pia->export( "contacts" );
foreach my $contact ( $pia->entries() ) {
print "$contact->{NAME}, $contact->{VORNAME}\n";
}
$pia->export_csv( file => "C:/my/piacontacts.csv" );
=head2 FUNCTIONS
=over
=item new( [ key => value, ...] )
Creates and returns a new Acme::PIA::Export object.
Parameters are given as key => value pairs. The most commonly used are "username" and "password".
If you expirience problems you can also give the parameter "DEBUG" => 1
to get verbose output from all functions.
=item export( SCOPE )
Export all objects for the given scope (contacts, calendar etc.) and stores them in the
Acme::PIA::Export object.
ATTENTION: Only "contacts" scope is implemented up to now! Look out for future releases.
=item entries()
Retrieve a list with all entries as hashes.
=item entries_csv( [key => value, ...] ) [NOT YET IMPLEMENTED]
Retrieve entries in csv format. Without arguments they are returned as a list of lines, including
column headers as first row. The column headers can be turned off by setting the option 'headers => 0'.
If the parameter 'file => "/path/to/file.csv"' is given, then the output is saved to the given file
directly and the number of rows written (excluding the column headers) is returned.
TODO: In future releases, there will be the option to pass along a "fields" paramter as a reference
to an array that holds the names of the columns to be exported.
=item entries_xls( file => /path/to/file.xls [, key => value, ...] ) [NOT YET IMPLEMENTED]
Retrieve entries in xls format.
The parameter 'file => "/path/to/file.xls"' is mandatory. The output is saved to the given file
directly and the number of rows written (excluding the column headers) is returned.
The column headers can be turned off by setting the option 'headers => 0'.
TODO: In future releases, there will be the option to pass along a "fields" paramter as a reference
to an array that holds the names of the columns to be exported.
=item fields( [SCOPE] )
( run in 2.372 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )