Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • by rjbs (4671) on 2008.04.22 6:24 (#62332) Homepage Journal
    First off: I think you mean s/@foo/@exception_types/ in your error messages and a fat arrow rather than an = in your use statement.

    I ran into this problem when developing Sub::Exporter. It lets you say:

    my $sub;
    use Thing::ThatExports exported_routing => \$sub;
    ...and the coderef goes into the scalar instead of your symbol table. This never worked:

    exporting_routine => \my $sub;
    My assumption is that it's because of this equivalency:

    use Foo bar => $baz;
    BEGIN {
      require Foo;
      Foo->import(bar => $baz);
    The Secret Begin Block (tm) seems to have an invisible scope. Just like the Phil Collins song.
    • Yeah, I was getting a bit sloppy in the post. Thanks for pointing those out.

      I've tried using PadWalker to get around some of these issues, but no love. Damn.