On Tue, 28 Dec 2004 22:31:47 -0700, Luke Palmer <[EMAIL PROTECTED]> wrote:
> Ashley Winters writes:
> > sub foo (Class $who) {
> > my $thing := $who<$var>;
> > my &func := $who<&func>; # how would I do this otherwise?
> > }
>
> In current Perl 6:
>
> sub foo (Class $who) {
>
Ashley Winters writes:
> sub foo (Class $who) {
> my $thing := $who<$var>;
> my &func := $who<&func>; # how would I do this otherwise?
> }
In current Perl 6:
sub foo (Class $who) {
my $thing := $::($who)::var;
my &func := &::($who)::func;
}
However, I agree that
On Wed, 29 Dec 2004 06:55:11 +0300, Alexey Trofimenko
<[EMAIL PROTECTED]> wrote:
> P.S. I have one (almost unrelated to topic) observation: if sigil is a
> part of a variable name, then C< Package::$var > makes more sense than
> perl5 C< $Package::var >. (AFAIK, PHP5 works this way) And this requir
in perl5 C doesn't save us from typo bugs in code like
use strict;
print $OtherPackage::erroneuos_name;
in perl5 C auotovivifies ${__PACKAGE__ . "::"}{var} glob at
compile time, so there's something one could check with C, but to
do it manually is senseless.
And there are no globs in perl6.