Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

dir structure looks like

... lib/ ... lib/C/ ...

As previously stated, will already exist on your system. Attempting to write new code with "package B;" will cause you all sorts of problems. You should avoid this name.


That's fine. The class name will become "C::C1". My previously posted "lib/" should be moved to "lib/C/", and the first line should be changed to:

package C::C1;

In my "./", you should change

use C1; my $c1 = C1::->new();


use C::C1; my $c1 = C::C1::->new();

After making those changes, note the difference in the last line:

$ ./ A=HASH(0x9897d0) A-bar D=HASH(0x989890) D-bar whos_who() is in package: C $self is in package: C::C1

The hexadecimal values in "X=HASH(0xhhhhhh)" will likely be different: that's not significant; you could get different values on separate runs using the same code.

— Ken

In reply to Re^3: object oriented Perl advice / constructor creation in child class by kcott
in thread object oriented Perl advice / constructor creation in child class by smarthacker67

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2023-09-26 19:02 GMT
Find Nodes?
    Voting Booth?

    No recent polls found