As many have pointed out the error and alternatives, I want to point out that when debugging it's worth fully mining the error message.
For example, you posted the error and it said you didn't have an object on line 27 where the method print_name was being called. The object in question is $self->{lib} which should lead one naturally back to where $self->{lib} was set (or defined).
Looking at the definition of $self->{lib} and knowing it's likely messed up might have shed light on the error; Assigning a return value of a method instead of an object where it seems an object was wanted.
In reply to Re: Need help with OO perl
by xhunter
in thread Need help with OO perl
by dkotturi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |