in reply to Re^3: Passing on "use"s
in thread Passing on "use"s

Huh! So I don't need sub import, or caller? Just a 1? Well I have no idea what's going on, but it does work, so that's all fine by me. Thanks!

Replies are listed 'Best First'.
Re^5: Passing on "use"s
by 1nickt (Canon) on Oct 29, 2023 at 17:56 UTC

    You're right, a more correct, more scalable version would use sub import { ... }

    package GenericModule; use Import::Into; sub import { feature ->import::into(1, 'say'); utf8 ->import::into(1); List::Util->import::into(1, 'shuffle'); } 1;


    The way forward always starts with a minimal test.
Re^5: Passing on "use"s
by 1nickt (Canon) on Oct 29, 2023 at 17:23 UTC

    It's the caller level:
    $target can be an package name to export to, an integer for the caller level to export to, or a hashref with the following options...


    The way forward always starts with a minimal test.