in reply to Re: [Parrot] Is there a class loader?
in thread [Parrot] Is there a class loader?
What Perl are you thinking of that has these semantics? In Perl 5 at least, modules are not packages are not classes (are not files)! They can be, of course, but that is by "the typical" convention, and is not close to being enforced like it is in, say, Java. This example breaks all those stipulations:
# client code use NiftySuperPack; whooo("hey"); # exported function my $obj = Nifty->new(); # where did that constructer come from?
# NiftySuperPack.pm # There *is* no package NiftySuperPack! package Nifty::Utils; sub whooo { ... } package Nifty; sub new { ... } { no strict; *{caller() . "::whooo"} = \&Nifty::Utils::whooo; # forced export }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: [Parrot] Is there a class loader?
by rg0now (Chaplain) on Feb 17, 2005 at 14:09 UTC | |
by gaal (Parson) on Feb 17, 2005 at 14:25 UTC |