in reply to Re: Re: variable "inheritance"; viral $VERSION
in thread variable "inheritance"; viral $VERSION

I did read your original post.

My suggestion adds typing. Yes. It also removes typing. You no longer need the "use Foo" line. You no longer need to declare your @ISA. The typing saved exceeds the typing added. I consider that reasonable if your intention is to save typing.

Now can you explain why on Earth you would want this?

  • Comment on Re: Re: Re: variable "inheritance"; viral $VERSION

Replies are listed 'Best First'.
Re: Re: Re: Re: variable "inheritance"; viral $VERSION
by amackey (Beadle) on Mar 09, 2003 at 04:37 UTC
    > Now can you explain why on Earth you would want this?

    The original intent stems from the fact that My::Package::* classes contain hundreds of classes (i.e. .pm files). But 95% of these classes inherit from one or two base classes. I was merely interested in probing whether there was a solution by which I could alter the base classes, and have the desired effect in all subclasses, without altering 100+ files (although it would be trivial to add one or two lines to each, following every "package Foo" line).

      Perhaps we should back up and consider something else.

      What do you see the point of $VERSION as? I told you several back what I think it to be, and therefore why you would not want a module reporting a $VERSION that is information from another file. But it seems that you think of $VERSION differently and see this as being a useful thing to do.

      What is the purpose of $VERSION to you, and why is it useful for a file to report its $VERSION as being the $VERSION of a different file that could readily be changed by someone independently from it?