Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Finding the path

by GrandFather (Saint)
on Apr 16, 2008 at 03:20 UTC ( #680724=note: print w/replies, xml ) Need Help??


in reply to Re: Finding the path
in thread Finding the path

For small scripts (say < 100 lines) OOP generally doesn't matter much, but for anything much over that it can provide some really useful leverage. Even poor man's OOP like:

use strict; use warnings; my $obj = bless {hi => "Hello world"}; $obj->greet (); sub greet { my $self = shift; print "$self->{hi}\n"; }

can end up saving a lot of time and confusion by avoiding passing lists of unnamed parameters into subs or accidentally doing weird stuff with global variables.


Perl is environmentally friendly - it saves trees

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2023-10-04 06:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?