Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • The code sample you posted is almost there. You just need to create an anonymous package name instead of using __PACKAGE__. I would simply append the accessor names to the base class, e.g. Object::Anonymous_ding_wong_line

        sub new {
            my $class = shift;
            my %args = @_;
            my $self = { };
            my $name = join('_', $class, keys %args);

            for my $arg (keys %args) {