On Wednesday, April 10, 2002, at 07:27 , Jenda Krynicky wrote:

> From:                 drieux <[EMAIL PROTECTED]>
[..]
>>  if the package assertion makes sense here
>>   then this should be a Module
>>    hence start with h2xs
>
> Well ... imagine you need some custom class of objects in your
> application or need to extend some class. Something small and
> specific so it doesn't deserve it's own file, but the functions and
> variables do have to belong to another package.

[..]
Jenda,

I have a problem with your argument - you begin by positing the
possible need for a sub Class in an application - and butress
your point by pointing towards PM's that do the package in package.

{ as previously noted, I have no fear of being merely pedantic.... }

having 'packages in packages' - in PM's makes sense to me -
no problem there - it's the idea of trying to do this in
an application that starts out with

        #!/usr/bin/perl....
        use strict;
        <the code here>
        package Foo::Bar;
        <FOO::BAR specifics here>
        package Foo::Baz;
        <FOO::BAZ specifics here>

this, this does not make sense - and as Jonathan noted would
not expressly protect the 'post package assertion code' from
any side effects before that assertion... So it still remains
'improbable' that one would want to do the "PM's" work inside
the application itself...

if anying trying to wedgie this 'small subclass(es)' into an application
leads into a "maze of twisty little passages all the same" - with
the Fanged Beast Creature of code maintenance hell looming large.
        
hence IF one wants to extend a class - why not simply do
the Decent Bit - whip out the h2xs - gin up the subClass
pm - and plonk your application in there in the .../bin directory
and have it all cleanly deliverable -

        perl Makefile.PL
        make
        make dist

so that you can then haul around one puppy with the standard
CPAN style deliverable(s). This way if one's subClass turns
out to truly have merit - one is off to the PAUSE and gets it
into the modules - and everyone likes you for doing your patriotic
duty, complete with appropriate POD - and at least one good piece
of application code to illustrate that it's a decent thing and all.

some of my arguments about PM's are at:

        http://www.wetware.com/drieux/CS/lang/Perl/PM/

My HORROR STORIES about trying to do a PM like approach in /bin/sh
which may help some understand the need for lexical scoping....

        http://www.wetware.com/drieux/CS/lang/shellScript/shlib.html

ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to