Hi monks,
I am wondering when the default methods ( *_isset, *_reset) of Class::MathodMaker gets created. Whether it gets created at the time of instantiation or only when it is invoked ($obj->field_reset). Would some one help me in debugging or inspecting the methods that get created from an MethodMaker object.
Here is my sample code
In Dumper result I am just getting the fields. I want to know all the possible methods that can be called from $class( including the deafults *_reset, *_isset ...). Please help me with more inspection or debugging modules to inspect the $class object.package class; use Data::Dumper; use Class::MethodMaker get_set => [ qw/ field_1 field_2 field_3 field_4 field_5 +/] , new_with_init => 'new', new_hash_init => 'hash_init' ; sub init { my $self = shift ; $self->hash_init(@_) ; } my %values = map { 'field_'.$_ => $_ } (1 .. 5 ); my $class = class->new(\%values); print Dumper($class); 1;
Thanks for the help, it helped me a great, also I found another module Class::Inspector to inspect the methods in the object.
print Dumper(Class::Inspector->methods($class);
In reply to when is *_reset methods of Class::MethodMaker gets created by siraj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |