in reply to Problem With Exporting subs from Modules

If you want to use STEVE::Test, you have to name your module accordingly:
package STEVE::Test; # ^^^^^^^
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: Problem With Exporting subs from Modules
by OnlyPerlWillDo (Initiate) on Nov 29, 2014 at 09:23 UTC
    Well hell, thank you. I swear this was not the case two years ago, though; was it?

      Oh yes it was! But, you may not have put Test in a subdirectory two years ago. The STEVE:: bit is a path prefix to the the package file name. Perl searches its library path for ./STEVE/Text.pm. I picked up Perl around 2005 (5.8.8) and its been like that since then at least.

      Perl is the programming world's equivalent of English

        It's been like that since Perl 5.000 was released over 20 years ago.

        I remember putting it in a subdirectory, but we were probably using a very old version of perl. At least five, but that was also RHEL, and I've had the problem with modules on every other system (BSD, ubuntu, centos) since.
Re^2: Problem With Exporting subs from Modules
by SimonPratt (Friar) on Dec 02, 2014 at 16:40 UTC

    Hmm, you don't HAVE to, though it is considered good practice to do so

    Adding import Test 'test'; after the use statement will most likely work equally well