Christian Winter > Acme-PIA-Export > Acme::PIA::Export

Download:
acme-pia-export/Acme-PIA-Export-0.019.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.019   Source  

NAME ^

Acme::PIA::Export - Export contacts, calendars or todos from Arcor's PIA messaging

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.

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" );

FUNCTIONS

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.

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.

entries()

Retrieve a list with all entries as hashes.

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.

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.

fields( [SCOPE] )

Retrieve a list with all the column names. If you already did an export(), you can call 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 entries_XXX methods.

AUTHOR ^

Christian Winter <chrwin@cpan.org>

LICENSE ^

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"

BUGS ^

Please report those to the author.

syntax highlighting: