Re: Perl Object Creation problem...



howa <howachen@xxxxxxxxx> wrote:

lawre...@xxxxxxxxxxxxxxxxxxx ???

"howa" <howachen@xxxxxxxxx> writes:

it seems a little stupid if the class name must be the package full
name...


Perhaps this will offer enlightenement:

Suppose I have two classes Road::Apple and Fruit::Apple

#/usr/local/bin/howas-private-perl-like-language
use Road::Apple;
use Fruit::Apple;

my $thing = new Apple;

What kind of apple whould $thing be?


I don't think that was a rhetorical question, but you did not
address it.

What kind of apple whould $thing be?


One is delicious, the other not
so much.


[snip .sig, you are not supposed to quote those you know]


in other language, you also have this problem, java or c.
^^^^

What is with the "also" there?

Perl does not have that problem.


in fact, this is not a problem at all,


Then what kind of apple whould $thing be?

A red one or a brown one?

If the programmer cannot tell, then it looks like a problem to me...


--
Tad McClellan SGML consulting
tadmc@xxxxxxxxxxxxxx Perl programming
Fort Worth, Texas
.



Relevant Pages

  • Re: Perl Object Creation problem...
    ... it seems a little stupid if the class name must be the package full ... Perhaps this will offer enlightenement: ... What kind of apple whould $thing be? ...
    (comp.lang.perl.misc)
  • Re: Perl Object Creation problem...
    ... it seems a little stupid if the class name must be the package full ... Perhaps this will offer enlightenement: ... What kind of apple whould $thing be? ...
    (comp.lang.perl.misc)
  • Re: Perl Object Creation problem...
    ... it seems a little stupid if the class name must be the package full ... Perhaps this will offer enlightenement: ... What kind of apple whould $thing be? ... Perl does not have that problem. ...
    (comp.lang.perl.misc)