[p4] perl trigger

Weintraub, David david.weintraub at bofasecurities.com
Thu Nov 16 05:21:31 PST 2006

This sounds like a path problem. Write a simple trigger just to print
out the value of the $PATH environment variable and see what you get. If
$PATH returns nothing, then you have two choices:

* Include a complete path to all commands:

    @FILES = `/bin/ls -l /perforce/triggers` || die ("Bombed");

* Before you execute "p4d", set up the environment you want to use
including your $PATH, and various "P4" environment variables.

-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Robert McKenna
Sent: Wednesday, November 15, 2006 5:53 PM
To: perforce-user at perforce.com
Subject: [p4] perl trigger


I'm having a problem with a trigger which runs fine unless I try to
execute a command using back ticks or system. The following is a very
simple trigger I've been using for testing and which fails on the line
@FILES = `ls -l /perforce/triggers`;. The trigger succeeds if this line
is replaced with a static assignment to @FILES. "Die" produces no output
in the validation failure message. 



@FILES = `ls -l /perforce/triggers` || die("Bombed");

foreach $FILE (@FILES) {

  $test = $FILE;



The entry in the triggers table is this.


simple change-submit //test/perforce/robertm/triggers/CookedXenon/...
"/usr/bin/perl /perforce/triggers/simple.pl 2>&1"


Any thoughts would be welcome.


Rob McKenna

perforce-user mailing list  -  perforce-user at perforce.com

More information about the perforce-user mailing list