So, I'm trying to overload the iterative operator: <>, which, according to the camel, is possible. However, I'm running into a slight problem:my $data = <$obj>;
causes my iterator sub to be called once, in scalar context.
my @data = <$obj>;
causes my iterator sub to be called once, in scalar context.
ARRRRGG!
wantarray returns false no matter how I pervert my calling method, and I can't figure out why.
Re:Overload style
james on 2002-05-17T08:36:58
Hmm, passing it a reference to a sub, rather than an anon. I'll try an anonymous sub, but I've not got much hope at this point:-)
cheers for the tip though, will let you know how it works out.
James.