Re: Perl Object Creation problem...
- From: "howa" <howachen@xxxxxxxxx>
- Date: 29 Jun 2006 10:14:59 -0700
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? One is delicious, the other not
so much.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - lawrenabae@xxxxxxxxxxxxx s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into the correct order.
in other language, you also have this problem, java or c.
in fact, this is not a problem at all, if you want to specifiy, you can
still use the full path if needed.
the namespace and the class name are not the same thing.
.
- Follow-Ups:
- Re: Perl Object Creation problem...
- From: Tad McClellan
- Re: Perl Object Creation problem...
- References:
- Perl Object Creation problem...
- From: howa
- Re: Perl Object Creation problem...
- From: Aukjan van Belkum
- Re: Perl Object Creation problem...
- From: howa
- Re: Perl Object Creation problem...
- From: Brian McCauley
- Re: Perl Object Creation problem...
- From: howa
- Re: Perl Object Creation problem...
- From: lawrence
- Perl Object Creation problem...
- Prev by Date: Re: prematurely closed filehandle
- Next by Date: Re: deflate parts of a file
- Previous by thread: Re: Perl Object Creation problem...
- Next by thread: Re: Perl Object Creation problem...
- Index(es):
Relevant Pages
|