Indeed, I think it does. I had a chance to play around with it, and after a minor disagreement with autodie, I got it to do everything I needed.

For anyone reading this later on with the same question: the Import::Into docs make reference to autodie being difficult, but (to me, anyway) were a little vague on how to fix that. Almost all examples in the documentation use the following format:

my $target = scalar caller; $package->import::into($target, @arguments);

However, autodie doesn't work with the above approach, but they say "Some exporting modules, such as autodie or strictures, care about the filename they are being imported to.". But it took just a bit more effort than just using the alternate hashref syntax. With autodie, what worked the best for me was this:

my ($package, $filename, $line) = caller; autodie->import::into({ package => $package, filename => $filename, line => $line });

(Note both of these examples would go into your module's import sub, as usual with Import::Into.)


In reply to Re^2: Including modules and pragmas in caller's scope via use by wanna_code_perl
in thread Including modules and pragmas in caller's scope via use by wanna_code_perl

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.