check for existence of attribute before calling it to break gently
This commit is contained in:
parent
866b6fea8c
commit
df255d3d5d
|
@ -272,7 +272,11 @@ sub _initialize {
|
||||||
#
|
#
|
||||||
$_method =~s{\.}{__}xg;
|
$_method =~s{\.}{__}xg;
|
||||||
$_method =~s{\-}{_}xg;
|
$_method =~s{\-}{_}xg;
|
||||||
$list->[-1]->$_method( $current );
|
if ( $list->[-1]->can( $_method ) ) {
|
||||||
|
$list->[-1]->$_method( $current );
|
||||||
|
} else {
|
||||||
|
print ( "ERror " . $list->[-1] . " cannot $_method\n" );
|
||||||
|
}
|
||||||
|
|
||||||
$current = pop @$list; # step up in object hierarchy
|
$current = pop @$list; # step up in object hierarchy
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue