At 01:36 PM 3/17/00 -0800, [EMAIL PROTECTED] wrote:
>Dan Sugalski wrote:
>
> >Okay, I just got bit in a *big* way by LIB$FIND_IMAGE_SYMBOL's annoying
> >tendency to believe logicals over filenames and assumptions that two
> >shareable images with the same base name are the same bloody image, and I'm
> >going to fix it once and for all. (Though not for 5.6.0. 5.005_04 and 5.6.1
> >and the Apache perl release, yes)
> >
> >I'm thinking of a scheme similar to what we have now with XS modules.
> >Colons get translated to underscores and PERL_ is prepended. IO's
> >executable would be PERL_IO.EXE, while Tk::IO would be PERL_TK__IO.EXE. If
> >the name is larger than 39 characters we'll use the XS name-reduction
> >algorithm. (I'm tempted to check for ODS-5 first, and use the full name if
> >it's less than 200 characters, but that sounds like too much work... :)
> >This should hopefully reduce namespace collisions and ensure that a "use
> >Apache;" won't get messed up by an existing APACHE logical.
> >
> >Comments anyone?
>
>Although this may cut against the grain of the recent namespace cleanup where
>symbols did s/foo/PL_foo/ and routines went /bar()/Perl_bar()/ would you not
>save yourself some 39 char room by employing (e.g.) PL_IO.EXE PL_TK__IO.EXE
>etc?  Or does this conflict with LIB$FIND_IMAGE_SYMBOL()'s ideas?
>Just a quick thought on the proposal.

Works for me, and saves two characters. I don't know that we'll hit the 39 
char max, but it's possible.

>Another idea: extend C<use> so that:
>
>   use ":nological" "Apache";
>
>does not TRNLNM.

Can't do that. The problem is in LIB$FIND_IMAGE_SYMBOL. When you tell it to 
load a shareable image, it takes the base name of the image. Then it looks 
to see if there's one already loaded with the same base name. If so, it 
uses that. If not it looks for a logical with the same name and tries that. 
If that doesn't exist then it actually uses the dev, dir, and extension 
info you gave it.

Couple 'o examples:

If PERL_ROOT:[000000.LIB.VMS_AXP.5_00503.AUTO.IO]IO.EXE is loaded and you 
tell LIB$FIS to load in 
PERL_ROOT:[000000.LIB.SITE_PERL.VMS_AXP.AUTO.Tk.IO]IO.EXE, it'll use 
PERL_ROOT:[000000.LIB.VMS_AXP.5_00503.AUTO.IO]IO.EXE *anyway*, because it's 
base name is IO.

And if I tell LIB$FIS to load in 
perl_root:[lib.site_perl.vms_axp.auto.apache]apache.exe and there's an 
apache logical defined. LIB$FIS will translate the logical and try to load 
that, regardless of whether it works or not. Bloody annoying, let me tell 
'ya, and I don't know of any way to override that.

>Along those lines may lie the place where:
>
>   use ":vmstextlib" "Foo::bar";
>
>may be, where bar.pm is a module in the FOO.TLB text library.

That'd be cool. There's discussion about this already--basically allow you 
to stick things in @INC that aren't directories and load out of them. It's 
all been tar/zip files so far but there's no reason that VMS libraries 
can't work.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to