Subject: | problems under debug |
Hi Ovid,
playing a little bit around with Role::Basic I get stuck with aborts
under the debugger, when I try to consume (aka 'with') into the main
package. The stripped down code looks following:
$ cat main.pl
use Role::Basic qw(with);
with('RoleA');
package RoleA;
use Role::Basic;
sub role_a {}
1;
The debugger stops with the following stacktrace:
$ perl -d main.pl
Loading DB routines from perl5db.pl version 1.32
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(main.pl:2): with('RoleA');
DB<1> n
Can't use an undefined value as a symbol reference at
/home/gaissmai/local/perl/lib/perl5/Role/Basic.pm line 373.
at /home/.../perl5/Role/Basic.pm line 373
Role::Basic::_get_valid_method('main', undef) called at
/home/.../perl5/Role/Basic.pm line 356
Role::Basic::_get_methods('Role::Basic', 'main') called at
/home/.../perl5/Role/Basic.pm line 251
Role::Basic::_add_role_methods_to_target('Role::Basic', 'RoleA',
'main', 'HASH(0x997c368)') called at /home/.../perl5/Role/Basic.pm line 127
Role::Basic::apply_roles_to_package('Role::Basic', 'main', 'RoleA')
called at /home/.../perl5/Role/Basic.pm line 24
Role::Basic::__ANON__[/home/.../perl5/Role/Basic.pm:25]('RoleA') called
at main.pl line 2
Debugged program terminated. Use q to quit or R to restart,
use o inhibit_exit to avoid stopping after program termination,
h q, h R or h o to get additional info.
DB<1>
Best Regards
Charly