Here's what perlobj says:
If you need to, you can force Perl to start looking in some other package:
my $barney = MyCritter->Critter::find("Barney"); $barney->Critter::display("Height", "Weight");

Here "MyCritter" is presumably a subclass of "Critter" that defines its own versions of find() and display(). We haven't specified what those methods do, but that doesn't matter above since we've forced Perl to start looking for the subroutines in "Critter".

As a special case of the above, you may use the "SUPER" pseudo-class to tell Perl to start looking for the method in the packages named in the current class's @ISA list.

Personally I don't like the style you are suggesting, because the use of this syntax suggests that DBI is a subclass of SomeDatabaseStuff (which would be a class, with my_funny_sql being a method), causing confusion.


In reply to Re: $object->UnrelatedPackage::some_subroutine() by itub
in thread $object->UnrelatedPackage::some_subroutine() by Thilosophy

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.