Hi All,
I have a doubt in OO Perl usage.

I create a class with a method which takes 3 parameters as input, generate_hash($i, $j, $k).

When I create an object for this class, I would call the method like this,
$obj->generate_hash($i, $j, $k).
But in the method, i should shift once to get the self class and then the parameters. Like,
my $self = shift;
my( $i, $j, $k) = @_;

How should I need to use this method, if I need to call the method in the same class in another method, where self class shift statement is not needed?
i.e, I would be calling the method as just, generate_hash(..

Thanks and hope the question is clear.


In reply to OO perl query by rsennat

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.