Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

This should work

by Anonymous Monk
on Dec 29, 1999 at 10:04 UTC ( #1468=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

use Set::Scalar; use Set::Scalar::Valued; $foo = Set::Scalar::Valued->new; $foo->insert("bar", Set::Scalar->new); $foo->value("bar")->insert("baz"); # But I get 'Can't call method 'insert' on unblessed # reference at test.pl line 6.' What's the deal oh wise # ones?

Comment on This should work
Download Code
Replies are listed 'Best First'.
RE: This should work
by chromatic (Archbishop) on Apr 01, 2000 at 11:07 UTC
    I think you need to create your "bar" object explicitly before you insert() it into "foo". (An "unblessed reference" is something that you're treating as an object before Perl knows it's an object. See bless.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1468]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2015-07-31 19:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (280 votes), past polls