Stas Bekman <[EMAIL PROTECTED]> [19-11-2004 21:51]: > Radoslaw Zielinski wrote: >> Stas Bekman <[EMAIL PROTECTED]> [14-11-2004 17:05]: >>> Radoslaw Zielinski wrote: >> [...] >>>>> to support this aliasing feature. Or do you suggest to just alias the >>>>> namespaces? >>>> Maybe I'm missing something. I was thinking about just aliasing the >>>> namespaces. >>> It's a way more complicated than it seems to be at first sight. Search >>> the dev list's archives for EazyLife to see some of the problems. >> Done... OK, so AUTOLOAD is just a can of worms. >> But, as the code we're trying to make work already knows which >> modules does it need to work, we can try a different approach: >> trap the "use Apache::OldName" calls with a subroutine ref in @INC. >> Example implementation attached; would this work? >> I actually don't really like it, as it's a hack, but... I can't see >> how this could impact on anything. >> Well, let's see what I've missed now ;-) > IMHO, it's a waste of time to try to resolve the namespace issue before > the API incompability is resolved (which I doubt is possible or shouldn't > be even attempted)
Huh? Resolving the namespace issue just removes the API incompatibility problem, doesn't it? [...] >>> The problem is that mp1 and mp2 aren't fully compatible, and there is no >>> way to make them so 100%, mainly. So you have a problem here. You can't >>> run all mp1 and mp2 applications under the same interpreter. Again take a >>> look at lib/Apache/compat.pm %overridable_mp2_api and read: >>> http://perl.apache.org/docs/2.0/api/Apache/compat.html#Compatibility_Functions_Colliding_with_mod_perl_2_0_API >> I've seen it before and still don't see a problem, when we have *different >> namespaces*. I assume, that the compatibility layer is similar (in >> effect, not necessarily the implementation) to the attached one. >> Can the problem you're seeing be resolved by (I don't know how to do it >> mod_perl-wide; maybe a per-VirtualHost/Location directive, telling mp2 >> to return objects blessed into a specific namespace for a given handler?): >> package handler_for_mp1_partially_ported_to_mp2; >> sub handler { >> my $r = bless shift, 'Apache::RequestRec'; # was Apache2::RequestRec >> # same thing with $c or whatever >> ... > Have you read the URL quoted above? The two APIs behave totally different Yes, Stas, I have read it. Several times, actually, to make sure I haven't left out any unresolvable issues. I really don't see any. Could you name it? > and it's not possible to figure out at run time, which API generation is > desired. ...I just don't see an easy way to resolve this one right now, if the httpd.conf directive option I mentioned earlier is not acceptable / possible. But I think I'll figure something out. > The code you've attached doesn't address that issue and it should be the > first issue to tackle. The rest is easier. [...] -- Radosław Zieliński <[EMAIL PROTECTED]> [ GPG key: http://radek.karnet.pl/ ]
pgpULaV7FyFxv.pgp
Description: PGP signature
