in reply to Re^2: Spiffy: How to define the constructor to take parameters
in thread Spiffy: How to define the constructor to take parameters

Did you try just my $self = super; instead of reflexively posting a question?

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^4: Spiffy: How to define the constructor to take parameters
by bwagner (Initiate) on Oct 29, 2007 at 07:10 UTC
    Thank you, Dragonfly, I was not aware that super was a method that could be called as a free method. However, I could have seen it if more closely reading the docs.

    For the record, here's what I changed about the constructor:

    sub new() { my $raw = pop @_; my $self = super; $self->raw($raw); return $self; }
    Thank you
    Bernhard