develooper Front page | perl.fwp | Postings from April 2003

Re: Fun with Perl, for a change

Thread Previous | Thread Next
From:
Andy_Bach
Date:
April 10, 2003 10:06
Subject:
Re: Fun with Perl, for a change
Message ID:
OF2260587E.E345040E-ON86256D04.005D9B78@uscmail.dcn
I was thinking I was on to something in that:
sub class
{ print "class" }
sub puts
{ print "puts" }

at least give output for
$x.class.puts;

I was thinking there must be some autoload chicanery, at least for 
'->class' - you'd get a call to class w/ the unknown obj name, which could 
be used to find the var ...

Does it have trouble w/:
@x = qw(hey ho);
$x = 2;
$x[1].class;

???

a

Andy Bach, Sys. Mangler
Internet: andy_bach@wiwb.uscourts.gov 
VOICE: (608) 261-5738  FAX 264-5030

"Believe nothing, no matter where you read it or who has said it, not even 
if I have said it, unless it agrees with your own reason and your own 
common sense." Buddha

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About