On Mon Apr 02 12:03:56 2007, RLB wrote:
Show quoted text> Thing you might want to think about...
>
Good stuff, thanks. Please comment on my comments :)
Show quoted text> 1. Installation of a module to support one app could accidentally
> destroy another app.
This would be avoided by good planning/layout or not blindly slurping in all possible NSs :)
I could point all of that out in the POD I reckon
Show quoted text> 2. What if somebody injects a Foo/Utils/HAHAHAHAHA.pm that contains
> BEGIN { system("rm -rf
> / &"); }
They'd need to secure their system, like adding strict.pm in . could make 'use strict;' a bad
thing...
That is what lib::restrict is for :)
or if they really don't want to do that then blindly slurping in all possible NSs isn't for them.
Then again if someone can inject Foo/Utils/HAHAHAHAHA.pm that does that then why
couldn't they modify the valid Foo/Utils.pm todo the same? then
use base 'Foo::Utils'; or use Foo::Utils; would be just as bad
Show quoted text> 3. What about unexpected .pm in say .svn dirs
Directories are only followed if a .pm exists, so if their is a .svn.pm then .svn/ will be
followed it not it won't.
If ever .pm-less directory support is added it shoudl avoid .dirs anyway because of theri
nature and that they'd be an invalid NS.
Show quoted text> 4. It not really inheritence in a strict since
Could you clarify what you mean? Its just a multiple use base shortcut, the only relation to
inhertance is its use of base.pm
Show quoted text> 5. Your filesystem's choice of order when doing a readdir call will
> affect your @ISA
Good point, perhaps I'll add support for a sort routine...
use base { Foo => \%foo_dir_sorter, Bar => \&bar_dir_sorter };
Generally this module is meant for when there is one X::Y::Z where you want to grab every
method under it automatically which means its not meant for every occasion.