On Oct 23, 2:37 pm, da...@davidfavor.com (David Favor) wrote:
[omitted]
> > 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.
>
> sub add_class_method {
> my($class,$name,$code) = @_;
> no
On 2010-10-23 18:50, David Favor wrote:
Given an instantiated class object, what's the
best way to add additional methods after instantiation.
Specifically I'm working with qpsmtpd and desire to
add a method is_spooled() to every session, so I can
call if ($self->is_spooled) rather then is_spoo
On Oct 23, 2:37 pm, da...@davidfavor.com (David Favor) wrote:
> Paul Johnson wrote:
[snip]
> add_class_method($class,$name,$code);
>
> # all three of these invocations works correctly
> test_method($self);
> &$code($self);
> $self->test_method;
>
> }
Hm, strawberr
From: "Jeff Peng"
> > 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 l
> 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 me
Paul Johnson wrote:
On Sat, Oct 23, 2010 at 07:52:50PM +0200, Shlomi Fish wrote:
On Saturday 23 October 2010 18:50:44 David Favor wrote:
Given an instantiated class object, what's the
best way to add additional methods after instantiation.
Specifically I'm working with qpsmtpd and desire to
ad
On Sat, Oct 23, 2010 at 07:52:50PM +0200, Shlomi Fish wrote:
> On Saturday 23 October 2010 18:50:44 David Favor wrote:
> > Given an instantiated class object, what's the
> > best way to add additional methods after instantiation.
> >
> > Specifically I'm working with qpsmtpd and desire to
> > add
On Saturday 23 October 2010 18:50:44 David Favor wrote:
> Given an instantiated class object, what's the
> best way to add additional methods after instantiation.
>
> Specifically I'm working with qpsmtpd and desire to
> add a method is_spooled() to every session, so I can
> call if ($self->is_spo
Given an instantiated class object, what's the
best way to add additional methods after instantiation.
Specifically I'm working with qpsmtpd and desire to
add a method is_spooled() to every session, so I can
call if ($self->is_spooled) rather then is_spooled($self)...
Thanks.
--
Love feeling yo