From: "Jeff Peng" <pen...@nsbeta.info>
> > On Sat, Oct 23, 2010 at 07:52:50PM +0200, Shlomi Fish wrote:
> 
> >
> > Just be sure you know what you are doing.  Adding a method to somone
> > else's
> > class can be considered rude.  See the NOTE in perldoc perlmodlib.
> >
> 
> He/she is maybe coming from other language like Ruby.
> In ruby it's free to add methods to any class including the built-in ones.

Nothing prevents you from doing that in Perl either (well, with 
inside-out classes you'll have problems accessing the fields, but 
that's a different problem). The thing is that if you overdo this you 
end up with messy code.

Jenda
===== je...@krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to