in reply to Re (tilly) 1: autotie in Attribute Handlers
in thread autotie in Attribute Handlers
No, the code you're querying is correct. You're missing the fact that the autogenerated handler also has this line in it:
\$data = [ \$data ] unless \$was_arrayref;
So the effect of that code is to pass array refs to tie as array refs, and non-array-refs to tie as lists.
There is a bug here, but it was elsewhere: namely that the codewasn't correctly distinguishing between an attribute with a list of args (:Attr('list','of','args')) and an attribute with a single array ref as an arg (:Attr(['list','of','args'])). I've now fixed that.
There's a beta at http://www.csse.monash.edu.au/~damian//CPAN/Attribute-Handlers.tar.gz. Perhaps you and/or Marcel would like to see if it behaves more intuitively for you.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 3: autotie in Attribute Handlers
by tilly (Archbishop) on Nov 04, 2001 at 04:27 UTC | |
by TheDamian (Vicar) on Nov 04, 2001 at 05:12 UTC |