Perl: How to create objects on the fly?
My goal is to be able to use $obj like this: print $obj->hello() . $obj->{foo}; And I would like to create an object inline, maybe using something like this: my $obj = ( foo => 1, hello => sub { return 'world' } ); but when I try to use $obj as an object, I get an error saying that $obj has not been blessed. Is there some b...