Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Need help with OO perl

by borisz (Canon)
on Dec 27, 2008 at 02:23 UTC ( #732738=note: print w/replies, xml ) Need Help??


in reply to Need help with OO perl

($self->{lib}) = ($lib->print_name()); just put undef into $self->{lib} and undef->print_name can not work later. maybe you should replace
($self->{lib}) = ($lib->print_name());
with:
$self->{lib} = $lib;
Boris

Replies are listed 'Best First'.
Re^2: Need help with OO perl
by almut (Canon) on Dec 27, 2008 at 02:37 UTC

    Actually, it's the return value of print "From test1","\n"; that's being returned by print_name() (i.e. 1, not undef) — but otherwise your observation is of course correct...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://732738]
help
Chatterbox?
[Corion]: Oooh - I had another devious idea - "Host C" - a C language where every struct is 4K in size. This makes memory and disk access incredibly fast ;)

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2017-04-25 08:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (449 votes). Check out past polls.