I have two modules which are structurally identical. At one point, they access IO::All::io. In one case, it goes without a hitch. In the other,
DanBongino::_get(/home/geoff/Perl/newmod/DanBongino.pm:54): 54: my $data = io( $url )->slurp; DB<10> s Undefined subroutine &DanBongino::io called at /home/geoff/Perl/newmod +/DanBongino.pm line 54. at /home/geoff/Perl/newmod/DanBongino.pm line 54. DanBongino::_get("https://feeds.megaphone.fm/WWO3519750118/") call +ed at /home/geoff/Perl/newmod/DanBongino.pm line 71 DanBongino::Get() called at NewFetchPodcast.pl line 92 Getopt::Auto::CODE(0x55a5417cc5e0)(/usr/local/lib64/perl5/5.34/Getopt/ +Auto.pm:120):
Fiddling around in the debuggger
DanBongino::_get(/home/geoff/Perl/newmod/DanBongino.pm:54): 54: my $data = io( $url )->slurp; DB<12> io('foo') Undefined subroutine &DanBongino::io called at (eval 30)[/usr/share/pe +rl5/perl5db.pl:741] line 2. DB<13> IO::All::io('foo') Can't locate object method "_package" via package "foo" (perhaps you f +orgot to load "foo"?) at /usr/share/perl5/vendor_perl/IO/All.pm line +63.
In both cases the modules are executed with this code in a given-when
{ require DanBongino; $shows = DanBongino::Get() };
use IO::All; is present in both cases.

Assistance most greatfully received.


In reply to inconsistent module access by geoffleach

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.