Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: I need help calling can()

by btrott (Parson)
on Mar 08, 2001 at 05:06 UTC ( [id://62891]=note: print w/replies, xml ) Need Help??


in reply to I need help calling can()

Your problem is nothing to do with can.

Ack, updated: chromatic has told me correctly that you can call code refs just like princepawn is doing. Which invalidates my first point, leaving me only with...

Your problem is how you're setting your variables in make_grid. You have:

my ($border,$width,$height) = $self->{border}, $self->$w(), $self->$b();
You need parens around the right side. So it should look like this:
my($border,$width,$height) = ($self->{border}, $w->($self), $b->($self));
And that fixes the problem, or so it would seem, since when running the code my terminal cursor gets repositioned (very annoyingly, I might add :).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://62891]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-19 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found