Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Don't ask to ask, just ask
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
package p4_cache::p4; use strict; use warnings; use base qw(P4); use Params::Validate qw( validate_with SCALAR OBJECT BOOLEAN UNDEF ARR +AYREF HASHREF); use Data::Dumper; use Class::MethodMaker [ new => [ '-hash', '-init', 'new'], scalar => 'clientname' ]; sub init { my $self = shift; my %opts = validate_with( params => \@_, spec => { 'clientname' => { type => SCALAR }, 'port' => { type => SCALAR, optional => 1 } }, ); my $port = $opts{'port'}; if (!defined($port)) { my @p4_client = split /:/, $opts{'clientname'}; $port = "p4mynet-p4p-".lc($p4_client[1]).":188"; } # Connect to p4 $self->SUPER::new(); print Dumper($self); $self->SetClient($opts{'clientname'}); $self->SetPort($port); $self->Connect() || die 'Unable to connect to p4 server'; return $self; } ## end of sub init When I am trying to execute this code through my.pl Call present in pl my $obj = p4_cache::p4->new(clientname => 'keys:SITE:dev2'); I am getting a following error : $VAR1 = bless( { 'clientname' => 'keys:SITE:dev2' }, 'p4_cache::p4' ); No '_p4client_ptr' member found in P4 object! at p4_cache/p4.pm line 3 +2. No '_p4client_ptr' member found in P4 object! at p4_cache/p4.pm line 3 +3. No '_p4client_ptr' member found in P4 object! at p4_cache/p4.pm line 3 +4. Unable to connect to p4 server at p4_cache/p4.pm line 34. No '_p4client_ptr' member found in P4 object!. Looking forward for some help on this. Thanks in advance.

In reply to No '_p4client_ptr' member found in P4 object by vaibhav07

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others surveying the Monastery: (16)
    As of 2014-04-16 21:23 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      April first is:







      Results (434 votes), past polls