I either don´t like prototyping in perl,
but I hate user who don´t read what my methode or function want much more then 
prototypes. (This error cost me SO much time... every day there calls 
somebody... "your sub don´t work"... only because he/she passes $ $ instead of 
$ $ $.)
(I don´t like writing input checks for every methode, too^^)

Hope to see c++/java like polymorphism some day in perl.

"John W. Krahn" <[EMAIL PROTECTED]> hat am 10. Oktober 2008 um 12:18 
geschrieben:

> Deviloper wrote:
> > Hi there,
> 
> Hello,
> 
> > have a look at this example:
> > ########################################################
> > #!/usr/local/bin/perl
> > use strict;
> > use warnings;
> > 
> > my $a_hash = { hund => "Dogge",
> >                         katze => "Perser",
> >                         obst => "Banane"
> >                         };
> > 
> > sub test($){
> 
> You really shouldn't use prototypes in perl:
> 
> http://groups.google.com/group/comp.lang.perl.modules/browse_frm/thread/4958701f6b5155a3/84484de5eb01085b
> 
> 
> >    my $x = shift;
> > 
> >    print $x->{katze}; # Is this the same
> >    print $$x{"katze"}; # as this?
> > }
> > 
> > test($a_hash);
> > ######################################################
> > 
> > Do the both "print" lines the same thing
> > or do they only result in the same thing?
> 
> They are both the same:
> 
> perldoc perlreftut
> perldoc perlref
> perldoc perllol
> 
> See also the section "CAVEAT ON PRECEDENCE" in:
> 
> perldoc perldsc
> 
> 
> 
> 
> John
> -- 
> Perl isn't a toolbox, but a small machine shop where you
> can special-order certain sorts of tools at low cost and
> in short order.                            -- Larry Wall
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> http://learn.perl.org/
> 
>

Reply via email to