Acme-PIA-Export

 view release on metacpan or  search on metacpan

Acme-PIA-Export-0.019.html  view on Meta::CPAN

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Module Acme::PIA::Export</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>

<body style="background-color: white">

<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<ul>

		<li><a href="#example">EXAMPLE</a></li>
		<li><a href="#functions">FUNCTIONS</a></li>
	</ul>

	<li><a href="#author">AUTHOR</a></li>
	<li><a href="#license">LICENSE</a></li>
	<li><a href="#bugs">BUGS</a></li>
</ul>
<!-- INDEX END -->

<hr />
<p>
</p>
<hr />
<h1><a name="name">NAME</a></h1>
<p>Acme::PIA::Export - Export contacts, calendars or todos from Arcor's PIA messaging</p>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>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</p>
<p>It lets the user retrieve his data in CSV or XLS (not yet implemented) format or
as hashes.</p>
<p>If you don't know what PIA is, you will most probably not need this module.</p>
<p>
</p>
<h2><a name="example">EXAMPLE</a></h2>
<pre>
        <span class="keyword">use</span> <span class="variable">Acme::PIA::Export</span><span class="operator">;</span>
</pre>
<pre>
        my $pia = Acme::PIA::Export-&gt;new(</pre>
<pre>
                &quot;username&quot; =&gt; &quot;mylogin&quot;,
                &quot;password&quot; =&gt; &quot;verysecret&quot;</pre>
<pre>
        <span class="operator">);</span>
</pre>
<pre>
        <span class="variable">$pia</span><span class="operator">-&gt;</span><span class="variable">export</span><span class="operator">(</span> <span class="string">"contacts"</span> <span class="operator">);</span>
</pre>
<pre>
        <span class="keyword">foreach</span> <span class="keyword">my</span> <span class="variable">$contact</span> <span class="operator">(</span> <span class="variable">$pia</span><span class="operator">-&gt;</span><span class="variable">entries</s...
        
                <span class="keyword">print</span> <span class="string">"$contact-&gt;{NAME}, $contact-&gt;{VORNAME}\n"</span><span class="operator">;</span>
        
        <span class="operator">}</span>
</pre>
<pre>
        <span class="variable">$pia</span><span class="operator">-&gt;</span><span class="variable">export_csv</span><span class="operator">(</span> <span class="string">file</span> <span class="operator">=&gt;</span> <span class="string">"C:/my/piac...
</pre>
<p>
</p>
<h2><a name="functions">FUNCTIONS</a></h2>
<dl>
<dt><strong><a name="item_new">new( [ key =&gt; value, ...] )</a></strong>

<dd>
<p>Creates and returns a new Acme::PIA::Export object.</p>
</dd>
<dd>
<p>Parameters are given as key =&gt; value pairs. The most commonly used are &quot;username&quot; and &quot;password&quot;.
If you expirience problems you can also give the parameter &quot;DEBUG&quot; =&gt; 1
to get verbose output from all functions.</p>
</dd>
</li>
<dt><strong><a name="item_export">export( SCOPE )</a></strong>

<dd>
<p>Export all objects for the given scope (contacts, calendar etc.) and stores them in the
Acme::PIA::Export object.</p>
</dd>
<dd>
<p>ATTENTION: Only &quot;contacts&quot; scope is implemented up to now! Look out for future releases.</p>
</dd>
</li>
<dt><strong><a name="item_entries"><code>entries()</code></a></strong>

<dd>
<p>Retrieve a list with all entries as hashes.</p>
</dd>
</li>
<dt><strong><a name="item_entries_csv">entries_csv( [key =&gt; value, ...] ) [NOT YET IMPLEMENTED]</a></strong>

<dd>
<p>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 =&gt; 0'.</p>
</dd>
<dd>
<p>If the parameter 'file =&gt; &quot;/path/to/file.csv&quot;' is given, then the output is saved to the given file
directly and the number of rows written (excluding the column headers) is returned.</p>
</dd>
<dd>
<p>TODO: In future releases, there will be the option to pass along a &quot;fields&quot; paramter as a reference
to an array that holds the names of the columns to be exported.</p>



( run in 3.232 seconds using v1.01-cache-2.11-cpan-d8267643d1d )