Dearest wise monks
I am just starting with oo perl, read your excellent introductions on referencing, but still there's not enough light coming out of my brain :-)
I am populating an object with the attributes 'head', 'opinion', 'result' like this:
my $item = Item->new("something","another thing","the essence");When I dump the object (with Data::Dumper) I get:
$VAR1 = bless( { 'head' => 'something', 'opinion' => 'another thing', 'result' => 'the essence' }, 'Item' );
How can I get the whole contents of $item (all between the curly brackets)? I know how to get the single elements... but not the whole object.
The aim is to index it with elasticsearch:
$e->index( index => $index, type => $type, id => $id, body => { head => $head, opinion => $opinion, result => $result, } );
and I want to replace the "body" with my item
Thanks a lot in advance for any enlightenment!
MCSIn reply to beginner's question regarding objects by McSvenster
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |