[p4perl] It's not a crash on takeoff if you can't build the plane

Tim McDaniel tmcd at panix.com
Tue Apr 7 14:14:09 PDT 2009


I thought I'd report on my success, for the archives.

A reply from support at perforce.com had a key phrase:

<< I was a little surprised to see that there's a CPAN module, most of
our clients just build it directly against the API. >>

My reply:

Hrm.  CPAN is so much The Usual And Customary And Righteous Way to get
Perl modules that I didn't even consider that there might be another
way.

I did get something to work that way under Cygwin.  These are my
steps, but I'm not absolutely 100% sure that each one is necessary.
If you have any insights, I'd appreciate it.

- download the Perforce C++ API:
   ftp://ftp.perforce.com/perforce/r08.2/bin.cygwinx86/p4api.tgz
- tar zxf that
- move all the files in that hierarchy into one directory, in my
   case /download/Perforce/Cygwin/API/mashup
- download P4Perl:
   ftp://ftp.perforce.com/perforce/r08.2/bin.tools/p4perl.tgz
- tar zxf
- read RELNOTES.txt
- "perl Makefile.PL --apidir /download/Perforce/Cygwin/API/mashup"
     = I think the fact that it's only one directory is why I needed
       to move all the C++ files into one directory
     = it does not appear to allow spaces in the directory name
     = I believe that it does not allow relative paths
- "make" and "make install" as instructed.
- run a simple test program like in the Programming with
   P4Perl section of the "Perforce 2008.2 APIs for Scripting" manual.

-- 
Tim McDaniel, tmcd at panix.com



More information about the p4perl mailing list