shotgunefx has asked for the wisdom of the Perl Monks concerning the following question:

Not sure if this is the right place to ask but I noticed something odd when browsing the 5.8.0 documentation for UNIVERSAL.

It states at the end of the document "These subroutines should not be imported via use UNIVERSAL qw(...). If you want simple local access to them you can do *isa = \&UNIVERSAL::isa;" (which is how I do it anyway) but it states in the pod usage use UNIVERSAL qw( isa can VERSION ); as an example. This to me says bug or am I missing something obvious...

-Lee

"To be civilized is to deny one's nature."

Replies are listed 'Best First'.
Re: Oddity in UNIVERSAL documentation
by PodMaster (Abbot) on Feb 24, 2003 at 09:17 UTC
    Yes and no. See Re^2: Tk helps another package to export? for a clue, and note the comments in UNIVERSAL.pm "The use of Exporter below is a historical accident that should be fixed sometime.".

    If you wannna avoid inheriting Exporter's import don't use UNIVERSAL.

    update: yes, UNIVERSAL.pm's documentation ought to reflect the implications of useing the module.


    MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
    I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
    ** The Third rule of perl club is a statement of fact: pod is sexy.

      Thanks for the explanation. Curiosity, do you consider an oddity in the perl documentation a typo or a bug? In hindsight, it seems like the wrong choice in wording in my post. At first I was going to call it a typo but every mention I see of patches says that documentation is needed to complete it so I was thinking it might be more appropriate to call it a bug.

      -Lee

      "To be civilized is to deny one's nature."
        I'd be inclined to call it incomplete ;)(aka bug) it is certainly not a typo.


        MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
        I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
        ** The Third rule of perl club is a statement of fact: pod is sexy.