[p4] Passing description into p4 shelve using P4 perl module

daveg <[email protected]>
Newsgroups gmane.comp.version-control.perforce
Message-ID <[email protected]>
Posted on behalf of forum user 'daveg'.

Hi:

This topic is similar to "How to shelve a change with a one liner from the
CLI" only through perl P4 module instead.  

The problem is to run $p4->Run(shelve) in perl and somehow provide the
"description".  
This works at the cli...

    p416 --field "Description=this is the descr"
change -o | p4 shelve -i

Question is, how to mimic that in perl using the P4 module.

I have a feeling the answer may lie with Spec...






Class Methods





new P4::Spec.new( anArray ) -> aP4::Spec

Constructs a new P4::Spec object given an array of valid  field names.




Instance Methods





spec._< field name> -> aValue

Returns the value associated with the  field  named  < field name> . This
is equivalent to spec[ "< field name >" ] with the exception
that when used as a method, the  field names may be in lowercase regardless of
the actual case of the  field name.
client  =  p4 . fetch_client ()
root    =  client . _root
desc    =  client . _description
But how does that translate to per code ? 

I see... "...given an array of fieldnames". 

In perl, an array is a list (e.g. @arr).  But this looks like it
should be a hash, as in...
my %hsh = (client => "the _client_name", root =>
"rootname", desc => "This is the
description").  

Example needed !

Thanks in advance



--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/5600-passing-description-into-p4-shelve-using-p4-perl-module
_______________________________________________
perforce-user mailing list  -  [email protected]
http://maillist.perforce.com/mailman/listinfo/perforce-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.