Getting Flickr::API to work on Ubuntu Linux SOLVED

In order to use the Flickr::API example by Gabor Szabo, I needed to create a LWP object specifying the path to the system certificates when creating the Flickr::API object.

Works:

my $flickr_api = Flickr::API->new( {
    key       => $key,
    # secret  => $secret,
    unicode   => 1,
    lwpobj    => LWP::UserAgent->new(
        ssl_opts => { 
            SSL_ca_path => '/etc/ssl/certs',
        },
    ),
}); 

Doesn’t work Perl(reports a 500 error with “Can’t connect to api.flickr.com:443 (certificate verify failed)” ) :

my $flickr_api = Flickr::API->new( {
    key       => $key,
    # secret  => $secret,
    unicode   => 1,
    ssl_opts  => { 
        SSL_ca_path       => '/etc/ssl/certs',
    },
});

You could use Mozilla::CA as brian d foy suggests but the bundled file is from 2014. Personally, I’ll use the certificate files from the OpenSSL project. 🙂

Share Button

Perl and Flickr: Flickr::Simple2

I’m in the process of cleaning up Flickr::Simple2 and adding in support for oauth.  There are several Perl modules providing oauth which I will test for ease of use and maintainability.  Just an fyi at this point

Share Button

Howto: Unable to start Catalyst web applications using the built in development server? We have the answer

If you’re getting the “Can’t locate Catalyst/Engine/HTTP/Restarter.pm” error message, it is very likely you’re running a recent version of Catalyst:

script/lolcatalyst_lite_server.pl -r
Can't locate Catalyst/Engine/HTTP/Restarter.pm in @INC (@INC contains: /home/jason/catalyst-book-code/Chapter_3/LolCatalyst-Lite/script/../lib /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .). at /usr/lib/perl5/Class/MOP.pm line 116
        Class::MOP::load_first_existing_class('Catalyst::Engine::HTTP::Restarter') called at /usr/lib/perl5/Class/MOP.pm line 121
        Class::MOP::load_class('Catalyst::Engine::HTTP::Restarter') called at /usr/share/perl5/Catalyst.pm line 2634
        Catalyst::setup_engine('LolCatalyst::Lite', undef) called at /usr/share/perl5/Catalyst.pm line 1081
        Catalyst::setup('LolCatalyst::Lite') called at /home/jason/catalyst-book-code/Chapter_3/LolCatalyst-Lite/script/../lib/LolCatalyst/Lite.pm line 34
        require LolCatalyst/Lite.pm called at script/lolcatalyst_lite_server.pl line 55
Compilation failed in require at script/lolcatalyst_lite_server.pl line 55.

The problem is that Catalyst::Engine::HTTP::Restarter within Catalyst::Engine was replaced by Catalyst::Restarter within the Catalyst::Devel package. How to fix your application to use the updated development web server? Very easy. Rerun catalyst.pl with the “-scripts”, to rebuild just the scripts in the script directory, and “-force” to overwrite any files therein:

catalyst.pl -scripts -force LolCatalyst::Lite
 exists "LolCatalyst-Lite/script/lolcatalyst_lite_cgi.pl"
created "LolCatalyst-Lite/script/lolcatalyst_lite_cgi.pl"
 exists "LolCatalyst-Lite/script/lolcatalyst_lite_fastcgi.pl"
created "LolCatalyst-Lite/script/lolcatalyst_lite_fastcgi.pl"
 exists "LolCatalyst-Lite/script/lolcatalyst_lite_server.pl"
created "LolCatalyst-Lite/script/lolcatalyst_lite_server.pl"
 exists "LolCatalyst-Lite/script/lolcatalyst_lite_test.pl"
created "LolCatalyst-Lite/script/lolcatalyst_lite_test.pl"
 exists "LolCatalyst-Lite/script/lolcatalyst_lite_create.pl"
created "LolCatalyst-Lite/script/lolcatalyst_lite_create.pl"

If you’re interested in learning the Catalyst Web Framework (Perl based), I highly recommend The Definitive Guide to Catalyst: Writing Extensible, Scalable and Maintainable Perl–Based Web Applications.

Share Button

Get it here! Perl DBD::Sybase 1.09.01 for Active State Perl 5.10 and 5.8 on Windows XP/Vista/7 32bit

Assuming that you installed Sybase OpenClient 15.5 from the 15.5 PC Client:

Install ActiveState Perl from http://www.activestate.com (free) and install DBI if it isn’t already installed.  It should be but you never know…

  1. Start -> ActiveState Perl -> Perl Package Manager
  2. install DBI
  3. exit

Now, the easy part.  Install the DBD::Sybase 1.09.01 PPM:

  1. download DBD::Sybase 1.09.01 PPM
  2. extract zip file to temporary directory (e.g. c:\test)
  3. Start -> Run -> cmd.exe (as Administrator if Vista or Windows 7)
  4. cd \test
  5. ppm install DBD-Sybase.ppd
  6. exit

That’s it 🙂

It should automatically install the DBD::Sybase for Perl 5.8 or 5.10 depending on which version of Active State Perl you have installed.

Share Button

Get it here! Perl DBD::Sybase 1.09 for Active State Perl 5.10 on Windows XP/Vista/7 32bit

Assuming that you installed Sybase OpenClient 15.5 from the 15.5 PC Client:

Install ActiveState Perl from http://www.activestate.com (free) and install DBI if it isn’t already installed.  It should be but you never know…

  1. Start -> ActiveState Perl -> Perl Package Manager
  2. install DBI
  3. exit

Now, the easy part.  Install the DBD::Sybase 1.09 PPM:

  1. download DBD::Sybase 1.09 PPM
  2. extract zip file to temporary directory (e.g. c:\test)
  3. Start -> Run -> cmd.exe (as Administrator if Vista or Windows 7)
  4. cd \test
  5. ppm install DBD-Sybase.ppd
  6. exit

That’s it :)

Sybase
Share Button

Developing games with Perl and SDL

Andy Bakun over at Ars Technica wrote an excellent “HowTo” on writing games with Perl and the Simple DirectMedia Library:

Developing games with Perl and SDL

ars technicaGet ready to dive into game development! Ars explores the art of SDL game programming with Perl. A dynamic, high-level scripting language and powerful open source SDL bindings make it possible to produce sophisticated games without a lot of effort or overhead.
By Andy Bakun | Last updated February 14, 2006 9:00 PM CT

What is SDL_perl?

SDL_Perl is a perl interface to the Simple DirectMedia Library. It is composed of a both a XS wrapper to the SDL libraries and a series of Perl modules that export SDL functionality in an object-oriented fashion.
One of the biggest benefits of using SDL is that it allows portable media applications to be written without having to be concerned with specific implmentations of media libraries for each target platform. Bringing Perl into the picture takes the portability one step further, allowing media-rich applications to be written in a high-level language that can be targeted to a number of platforms. While programming using SDL requires knowledge of C and access to a C compiler, using SDL_perl does not. This greatly decreases the amount of time it takes to get something up on the screen and working.

Read more

Share Button

Perl module Flickr::Simple2 v0.03 for the Flickr API released!

I just uploaded the Perl module Flickr::Simple2 version 0.03 to CPAN (PAUSE) so it might be a few minutes/hours before it shows up in the CPAN mirrors.

Revision history for Perl extension Flickr::Simple2.

0.03  Wed May 13 11:18:00 2009
– significant changes to the API to make more methods of the Flickr API available.
– using Iterator::Simple so we can retrieve one photo at a time and internalize the handling of Flickr Photo *pages*
0.02  Initial CPAN release
0.01  Thu Feb 12 11:33:35 2009
– original version; created by h2xs 1.23 with options
-XA -n Flickr::Simple2

Share Button

So you want to tweet to Twitter from *WITHIN* Oracle 11g? Here’s how!

Lewis Cunningham Twitterhas once again given us a gem from the world of Oracle’s relational DBMS!  This time, he has written ORA_Tweet, an API to send/receive Tweets (microblog posts) from within Oracle 11g.  Major kudos to Lewis Cunningham for writing and releasing ORA Tweet to Sourceforge.net 🙂

Call the Twitter API from within an Oracle database. ORA_Tweet uses the UTL_HTTP API within Oracle to call the update_status API. It is written completely in PL/SQL.

So, my question is…  Will someone write a Flickr API for Sybase ASE?

Share Button

First official release of Flickr::Simple2 to Perl’s CPAN repository :)

Flickr
Flickr

Flickr::Simple2 is an XML::Simple based Perl API to communicate with Flickr.  It is in the early phases of development… comments are welcome :)

You will need to supply your own Flickr API key.

I released version 0.02 to Perl’s CPAN repository this morning after several delays related to the birth of my son a week ago.  As always, comments and constructive critism are welcome.

Share Button

Alpha test release of Flickr::Simple2

FlickrFlickr::Simple2 is an XML::Simple based Perl API to communicate with Flickr.  It is in the early phases of development… comments are welcome 🙂

You will need to supply your own Flickr API key.

Share Button