----- Original Message -----
From: "Piers Cawley" <[EMAIL PROTECTED]>
To: "Peter Bevan" <[EMAIL PROTECTED]>
Sent: Tuesday, August 08, 2000 10:32 AM
Subject: Re: wildcard includes


> "Peter Bevan" <[EMAIL PROTECTED]> writes:
> > > "Peter Bevan" <[EMAIL PROTECTED]> writes:
> > > However, I do like the idea of syntactic sugar to load a bunch of
> > > modules. I'm not sure you need the '*' though. Something like:
> > >
> > >     require Foo::Bar:: ;
> > >
> > > Has no real meaning currently and could be taken to mean 'load all of
> > > the modules under Foo::Bar'.
> >
> > The syntax is obvoiusly debatable, I'd be happy where it
> > "Foo^^%%$%^Bar%^%^%$$£" as long as it worked
> >
> > But seriously, I think that the systax you described is certainly better
> > than "*" which doesn't much fit the current Perl "style" I thin that
some
> > kind of identifier/wildcard is nessesary - if only that when you leave
> > things open, mistakes are made
> >
> > It also may be an idea to have some kind of package global to indicate
> > "community-mindedness" for want of a better phrase, thus leaving the
module
> > writer free to opt-out of the widlcard if he/she/it wished...
>
> Hmm... I think you run into the halting problem there. ie: Without
> loading the module how do you know if it's 'community minded'? And if
> you do load it, and it isn't community minded, how do you undo the
> load given that irreversible side effects are possible (hmm... a case
> for continuations perhaps...)
>

But surely a new loading mechanism can be included in the new perl build
which would determine the modules "community-mindedness" and them load or
unload it accordingly....

Failing that, would a naming convension be appropriate??? (ie the call would
be to Foo::Bar or Foo::* [1] but the file name would be appened ie
/foo/bar.pmc [2])
[1] Using the '*' just for the sake of argument
[2] A "community-minded" module being .pmc and a "non-community-minded"
being .pm"

Or maybe the option to opt-out is just implauseable, I dont know. The
question really lies on whether this is deemed as important enough to
require loading concessions from the new internals...

For my money the loading convension should be this:

/foo.pm            => use Foo;
/Foo/Bar.pm    => use Foo::Bar;
/Foo/*             => use Foo::*;  (or whatever wildcard is agreed upon);


Reply via email to