P4::OO - First class objects for Perforce specs
# use P4PERL and P4PORT/P4CLIENT environment by default my $p4oo = P4::OO->new();
P4::OO requires P4PERL to talk directly to Perforce P4::OO uses reasonable defaults, and using the caller's P4PORT and P4CLIENT environment variables to find the Perforce client to use.
P4::OO is distinguished from P4PERL in that P4PERL provides a handle for talking to Perforce in a manner similar to the 'p4' command. P4::OO represents Perforce specs as first class objects (similar to type-specific versions of P4::Spec objects), and provides capability for added functionality for each type of object.
These objects are provided and corresspond directly to the 'p4' subcommands by the same names: P4:OO::Branch P4:OO::Change P4:OO::Changelist - P4:OO::Change by another name. P4:OO::Client P4:OO::Depot P4:OO::Group P4:OO::Job P4:OO::Label P4:OO::User P4:OO::Workspace - P4:OO::Client by another name.
If you initialize your own P4PERL connection, you can have P4::OO use it instead of constructing it's own. You will also have to disconnect it when you're done. If P4:OO constructs it's own P4PERL connection, P4::OO will also attempt to destroy it at garbage collection time. # Connect to P4PERL and have have P4::OO reuse connection my $p4PerlObj = P4->new(); $p4PerlObj->SetClient( $clientname ); $p4PerlObj->SetPort ( $p4port ); $p4PerlObj->Connect(); # Initialize P4::OO with this P4PERL connection my $p4ooObj = P4::OO->new( 'p4PerlObj' => $p4PerlObj ); # When you're done with P4::OO and your P4PERL connection $p4PerlObj->Disconnect();
David L. Armstrong <firstname.lastname@example.org>
P4::OO is Copyright (c)2010-2011, David L. Armstrong.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
This program is distributed in the hope that it will be useful, but it is provided "as is" and without any expressed or implied warranties.