On Sun, Jul 14, 2013 at 04:09:52PM -0400, autarch@urth.org via RT wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=82327 >
>
> On Sun, 14 Jul 2013, Peter Rabbitson via RT wrote:
>
> > Queue: Module-Implementation
> > Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=82327 >
> >
> > On Sun, Jul 14, 2013 at 12:53:04PM -0400, Dave Rolsky via RT wrote:
> >> <URL:
https://rt.cpan.org/Ticket/Display.html?id=82327 >
> >>
> >> On Mon Jul 08 02:07:39 2013, RIBASUSHI wrote:
> >>
> >> I took a look at this, and I like the general idea, but the implementation seems overly complicated.
> >>
> >> I don't like that regexes load copy _different_ symbols than strings. Why should only regexes look at multiple packages?
> >
> > I am confused by the above sentence. Please clarify so I can reply to the rest.
>
> Doh, I combined two things. One is that regexes only look at subs. The
> more I think about it the more I think that's a good idea.
Right, as I do not see a way *how* to specify that a regex is supposed to
match a specific symbol type. We could do (... { '*' => qr/.../ }... )
but this goes against simplicity.
Show quoted text> The second is that regexes look at multiple implementation packages. I
> don't understand the use case for this at all, especially since you
> explicitly check that implementations are consistent.
>
This is *how* I check that implementations are consistent. If I do not
look at all implementor-packages, I can not compile lists to compare.
Now why the complexity of ensuring that implementation lists match: I
wanted to prevent *extra* symbols being imported from one of the
implementations without the user realizing it. Basically say you start
with A (foo bar) and B (foo bar). You do an import based on qr/^[a-z]/i.
Then you add 'baz_internal' to B - boom, you got an inconsistency you
are not likely to even realize exists.
Inspiration for this was Package::Stash itself - it blindly copies
any sub:
https://metacpan.org/source/DOY/Package-Stash-0.35/lib/Package/Stash.pm#L29
I am not hellbent on insisting this stays. But it seemed like the
only right thing to do, *especially* given the open-endedness of the
regex inclusion mechanism.
As far as it being an anti-feature loading a lot of extra crap - if
this is an issue, one can always request a specific implementation via
the envvar, in which case the entire mechanism is circumvented.
In any case - your call