# Add new registration object to the regArray my $ptrRegistrationArray = $session->param("registrationArray"); push(@$ptrRegistrationArray, $ptrCurrentRegistration); $session->param("registrationArray", $ptrRegistrationArray); $session->flush(); #### my $ptrRegistrationArray = $session->param("registrationArray"); foreach my $reg (@$ptrRegistrationArray) { print STDERR "reg is a " . ref($reg) . "\n"; print STDERR "reg = " . Dumper($reg) . "\n"; print STDERR "reg->can('testMethod') results: " . $reg->can("testMethod") . "\n"; # testMethod() is basically a "hello world" for the # Registration class. $reg->testMethod(); # Other work here } #### reg is a Registration reg = $VAR1 = bless( { 'name1' => 'value1', 'name2' => 'value2', 'name3' => 'value3', }, 'Registration' ); reg->can('testMethod') results: CODE(0x83406b8) hello world #### reg is a Registration reg = $VAR1 = bless( { 'name1' => 'value1', 'name2' => 'value2', 'name3' => 'value3', }, 'Registration' ); reg->can('testMethod') results: Can't locate object method "testMethod" via package "Registration"