in reply to (tye)Re2: Overriding Exporter::import
in thread Overriding Exporter::import

re :BEGIN { require Module VERSION; import Module LIST; }

True, but less enlightening! It's telling you that import is being called, it ought to tell you that VERSION is being called, too.

re "it was there...when?"

According to perldelta, the v-string definitly wasn't in 5.005, and it's less clear whether it was changed between 5.6.0 and 5.6.1.

If v-strings were not available, and the require Module version (list) requires a v-string literal, than it can't predate 5.6.x either, at least not in a way that's compatible with the current form.

—John

Replies are listed 'Best First'.
(tye)Re3: Overriding Exporter::import
by tye (Sage) on Jul 20, 2001 at 01:09 UTC

    &Module::VERSION is documented under require and I'm not much into duplicating documentation. A simple remention of it probably wouldn't hurt, though.

    Update: Er. Rather, &Module::VERSION should be documented under require instead of under use (as it was in 5.6.0 -- I haven't upgraded to 5.6.1 yet) and the use documentation should point to the require documentation, at least, IMHO ("H" stands for "hubristic", don't ya know?).

    Correct, v-strings were added at 5.6.0. I think the biggest changes to them between 5.6.0 and 5.6.1 was that someone settled on a name for them. (: There were some bug fixes having to do with Unicodish stuff that doesn't much matter in this context.

    No, the "require Module VERSION LIST" does not require a v-string literal. With 5.6.0 it, of course, had to support v-string literals. But it does now and always will (I bet) support simple numeric literals. (I encourage you to reread some of this and the related thread.)

            - tye (but my friends call me "Tye")
      grrrr... I was bit by the PM bug of preview going to "search results" instead of the preview, and lost my whole message!!! It's been a problem all day more than normal, but hadn't lost the message before (back button worked). I wish that would be fixed.

      To recap, it never occured to me that the version was a floating-point value, not a string. The syntax does take it (I had tried other things, but not a numeric literal). I'll update my tutorial later. Any other comments on my explorations?

      —John