WWW::Google::Contacts
it's nothing big but implement the Google Contacts Data API.
so Enjoy!
Thanks.
Perl is not the whole part of life. I know!
Labels: advent
Labels: advent
C:\strawberry\cpan\build\Plack-0.9006-ZEaDbK\eg\dot-psgi>plackup -a Hello.psgi -s AnyEvent
Accepting requests at http://0.0.0.0:5000/ORC:\strawberry\cpan\build\Plack-0.9006-ZEaDbK\eg\dot-psgi>plackup -a Hello.psgi -s ServerSimple
Plack::Server::ServerSimple: You can connect to your server at http://localhost:5000/
127.0.0.1 - - [23/十月/2009 22:19:15] "GET / HTTP/1.1" 200 11 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 GTB5"
127.0.0.1 - - [23/十月/2009 22:19:15] "GET /favicon.ico HTTP/1.1" 200 11 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 GTB5"try visit http://127.0.0.1:5000/ then you'll get the access_log like above.Labels: Plack
Labels: CPAN, OpenSocial, Shindig
my $str = 'o=1&v=3&p=5';
my $cipher = Crypt::CBC->new( {
'key' => 'length16length16',
'cipher'=> 'Rijndael',
'iv' => '1234567890abcdef',
'literal_key' => 1,
'padding' => 'null',
'header' => 'none',
keysize => 128/8
} );
my $encrypted = $cipher->encrypt($str);
print "encrypted: ".encode_base64($encrypted)."\n";
print "decrypted: ".$cipher->decrypt($encrypted)."\n";
my $hmac = Digest::SHA::hmac_sha1($encrypted, 'hmackey');
print "hmac: " . encode_base64($hmac) . "\n";
print "total: " . encode_base64($encrypted . $hmac) . "\n";PHP: crypt.php$str = 'o=1&v=3&p=5';
$encrypted = mcrypt_cbc(MCRYPT_RIJNDAEL_128, 'length16length16', $str, MCRYPT_ENCRYPT, '1234567890abcdef');
$decrypted = mcrypt_cbc(MCRYPT_RIJNDAEL_128, 'length16length16', $encrypted, MCRYPT_DECRYPT, '1234567890abcdef');
echo "encrypted: ".base64_encode($encrypted)."\n";
echo "decrypted: ".$decrypted."\n";
$blabla = hash_hmac('sha1', $encrypted, 'hmackey', 1);
echo "hmac: " . base64_encode($blabla) . "\n";
echo "total: " . base64_encode($encrypted . $blabla) . "\n";# perl crypt.pl
encrypted: rgPZe6swWb3t3yIoIZFQaQ==
decrypted: o=1&v=3&p=5
hmac: WLTGeyesYTUhwg6fjVqDudrKRz0=
total: rgPZe6swWb3t3yIoIZFQaVi0xnsnrGE1IcIOn41ag7naykc9
# php crypt.php
encrypted: rgPZe6swWb3t3yIoIZFQaQ==
decrypted: o=1&v=3&p=5
hmac: WLTGeyesYTUhwg6fjVqDudrKRz0=
total: rgPZe6swWb3t3yIoIZFQaVi0xnsnrGE1IcIOn41ag7naykc9Labels: CPAN, OpenSocial, Shindig
Labels: Moose