Mainframe2007 has asked for the wisdom of the Perl Monks concerning the following question:
But it always results in: Can't locate object method "name" via package "MyClass" at ./myclass.pl line 7.#!/usr/bin/perl use Data::Dumper; $m = MyClass->new(); $m->name("theo"); $m->id(1); exit; package MyClass; @fields = qw(id name); use Class::MethodMaker get_set => [ @fields ], new => "new";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Class::MethodMaker dynamic fields
by zwon (Abbot) on Dec 29, 2011 at 15:29 UTC |