Here's a clue
E:\new>perl -MConstants -wle"print for keys %Constants::;;print XX+YY" Name "main::XX" used only once: possible typo at -e line 1. import YY EXPORT XX BEGIN print() on unopened filehandle XX at -e line 1. E:\new>perl -MUNIVERSAL -MConstants -wle"print for keys %Constants::;; +print XX+YY" import YY EXPORT EXPORT_FAIL EXPORT_OK XX BEGIN 1
Smells like a bug to me.

In my activeperl5.6.1/5.8.0, UNIVERSAL.pm consists of

require Exporter; *import = \&Exporter::import; @EXPORT_OK = qw(isa can);
I don't know when that happened/changed, but perl is supposed to load UNIVERSAL AUTOMAGICALLY, so you shouldn't need to say use UNIVERSAL;

I wanna hear what tye, merlyn and other people in the know have to say.

update: more clues

E:\new>perl -MConstants -wle"print for keys %UNIVERSAL::;;print XX+YY" Name "main::XX" used only once: possible typo at -e line 1. import can isa VERSION print() on unopened filehandle XX at -e line 1.
In Universally unimportant and overused tye says
(currently, Exporter::import() is called whenever you use a module that doesn't define any import method at all, even it that module doesn't even mention Exporter -- this will probably be "fixed" at some point but with this you can "fix" it now and see if you are using any modules that depend on this "bug").
I think it's fairly obvious that you should avoid using the package variables @EXPORT unless you also push @ISA, 'Exporter'; cause you'll have unexpected results (and what's the point of an @EXPORT if you don't wanna export anything).


MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
** The Third rule of perl club is a statement of fact: pod is sexy.


In reply to Re: Tk helps another package to export? by PodMaster
in thread Tk helps another package to export? by tall_man

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.