[p4perl] "p4 -x file" in the P4 module?

Tim McDaniel tmcd at panix.com
Fri Apr 10 16:56:25 PDT 2009

When using the P4 module, is there a way to get the effect of, for
     p4 -x infile files?
     $p4->Run('-x', 'infile', 'files')
results in "Unknown command".

There is

     P4::SetInput( arg )

     Save the supplied argument as input to be supplied to a subsequent
     command. The input may be: a hashref, a scalar string or an array
     of hashrefs or scalar strings. Note that if you pass an array the
     array will be shifted once each time the Perforce command being
     executed asks for user input.

But that reads from memory.  Of course it's straightforward enough for
my code to read the 257KB file into an array, but it's shorter if I
can get P4 to do it.

Tim McDaniel, tmcd at panix.com

More information about the p4perl mailing list