Acme::PIA::Export - Export contacts, calendars or todos from Arcor's PIA messaging |
Acme::PIA::Export - Export contacts, calendars or todos from Arcor's PIA messaging
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.
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" );
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.
ATTENTION: Only ``contacts'' scope is implemented up to now! Look out for future releases.
entries()
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.
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.
fields()
without
parameters to get the column names for the type of the last export. Otherwise, pass the name of the scope
as a string.
You can rely on that the order of column names is the same as the field order returned by the export_XXX methods.
Christian Winter <chrwin@cpan.org>
This peace of code is licensed under the same terms as Perl itself. You should have received a copy of this license together with your Perl version. You can read it at http://www.perl.org or by typing ``perldoc perlartistic'' or ``perldoc perlgpl''
Please report those to the author.
Acme::PIA::Export - Export contacts, calendars or todos from Arcor's PIA messaging |