Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^7: Use method/function signatures with Perl

by dragonchild (Archbishop)
on Dec 06, 2004 at 16:40 UTC ( #412690=note: print w/replies, xml ) Need Help??


in reply to Re^6: Use method/function signatures with Perl
in thread Use method/function signatures with Perl

That breaks immediately because &foo is expecting an ARRAY, not an object of class Bar.

In other words, because you're (mis)using ref (which we agreed you shouldn't), you already implement the scheme I suggested. However, there's going to be the user (and it's usually someone like me ... :-) that would assume that since I'm using an array to represent my Bar class, it should fit into either an ARRAY or Bar hole.

It may not be a code issue as much as a documentation issue. That said, there is still an issue. :-)

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

  • Comment on Re^7: Use method/function signatures with Perl

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://412690]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2018-07-18 22:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (397 votes). Check out past polls.

    Notices?