I am a C#/SQL Server programmer tasked with converting an ancient Perl/Posgtres website into C#. I have been programming for many years and in many languages, but never in Perl and I am having some challenges getting started.
I have downloaded and installed Postgresql 9.0 on my desktop and populated it with data from the production site which is on a machine that could die any day. I have written some test code in C# using Npgsql that successfully accesses data in that database, but I have encountered problems using PGAdmin III and psql. Both appear flakey or improperly configured (highly likely).
I have installed ActiveState 6.0.3 and Strawberry Perl and I am attempting to get started, but hit a wall quickly. The code below fails on the “use Pg;” line. I have located several versions of this file, but none that seems to meet the approval of the compiler. I think the problem involves four variables:
- Version of ActiveState Komodo product (6.0.3)
- Version of Perl compiler (perl 5, version 12, subversion 2 (V5.12.2) built for MSWin32-x64-multi-thread, according to command line “perl –v”)
- Version of Postgresql (9.0)
- Version of Pg.pm ???
Can you tell me what version of Pg I should install and where to put it in the code base?
use CGI qw(:standard);
use Pg; <-- FAILS HERE - CANNOT LOCATE FILE
$q = new CGI;