App::Office::Contacts::Import::vCards - Import vCards for use by App::Office::Contacts
App::Office::Contacts::Import::vCards
The scripts discussed here, vcards.cgi and vcards.psgi, are shipped with this module.
A classic CGI script, vcards.cgi:
use strict; use warnings; use CGI; use CGI::Application::Dispatch; # --------------------- my($cgi) = CGI -> new; CGI::Application::Dispatch -> dispatch ( args_to_new => {QUERY => $cgi}, prefix => 'App::Office::Contacts::Import::vCards::Controller', table => [ '' => {app => 'Initialize', rm => 'display'}, ':app' => {rm => 'display'}, ':app/:rm/:id?' => {}, ], );
A Plack script, vcards.psgi:
#!/usr/bin/perl use strict; use warnings; use CGI::Application::Dispatch::PSGI; use Plack::Builder; # --------------------- my($app) = CGI::Application::Dispatch -> as_psgi ( prefix => 'App::Office::Contacts::Import::vCards::Controller', table => [ '' => {app => 'Initialize', rm => 'display'}, ':app' => {rm => 'display'}, ':app/:rm/:id?' => {}, ], ); builder { enable "Plack::Middleware::Static", path => qr!^/(assets|yui)/!, root => '/var/www'; $app; };
For more on Plack, see My intro to Plack.
App::Office::Contacts::Import::vCards implements importing vCards for use by App::Office::Contacts.
App::Office::Contacts
App::Office::Contacts::Import::vCards uses Moose.
Moose
This module is available as a Unix-style distro (*.tgz).
See http://savage.net.au/Perl-modules/html/installing-a-module.html for help on unpacking and installing distros.
The primary pre-requisite is App::Office::Contacts. You should study the documentation for that module before proceeding.
Install App::Office::Contacts::Import::vCards as you would for any Perl module:
Perl
Run cpan: shell>sudo cpan App::Office::Contacts::Import::vCards
or unpack the distro, and then either:
perl Build.PL ./Build ./Build test sudo ./Build install
or:
perl Makefile.PL make (or dmake) make test make install
Either way, you'll need to install all the other files which are shipped in the distro.
HTML::Template
Copy the distro's htdocs/assets/ directory to your web server's doc root.
Specifically, my doc root is /var/www/, so I end up with /var/www/assets/.
Copy the distro's httpd/cgi-bin/office/ directory to your web server's cgi-bin/ directory, and make vcards.cgi executable.
So, I end up with /usr/lib/cgi-bin/office/import/vcards.cgi.
Now I can run http://127.0.0.1/cgi-bin/office/import/vcards.cgi.
Point your broswer at http://127.0.0.1/cgi-bin/import/vcards.cgi (trivial script).
Yes, both gender and title are derived from the data, rather than being just pieces of data. This means neither of these 2 values are guaranteed to be correct.
Email the author, or log a bug on RT:
https://rt.cpan.org/Public/Dist/Display.html?Name=App-Office-Contacts-Import-vCards
App::Office::Contacts::Import::vCards was written by Ron Savage <ron@savage.net.au> in 2009.
Home page: http://savage.net.au/index.html
Australian copyright (c) 2009, Ron Savage. All Programs of mine are 'OSI Certified Open Source Software'; you can redistribute them and/or modify them under the terms of The Artistic License, a copy of which is available at: http://www.opensource.org/licenses/index.html
To install App::Office::Contacts::Import::vCards, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Office::Contacts::Import::vCards
CPAN shell
perl -MCPAN -e shell install App::Office::Contacts::Import::vCards
For more information on module installation, please visit the detailed CPAN module installation guide.