in reply to Re: bless + tie
in thread bless + tie

I wanted to get rid of getter/setter methods (even those generated by autoload) replacing them with hash access, while preserving object integrity by intercepting the hash accesses and possibly processing them in a tied hash fashion...

Replies are listed 'Best First'.
Re: You missed my point
by tachyon (Chancellor) on Oct 01, 2003 at 06:38 UTC

    My point would be what on earth for. Just so you can do this:

    print "Blah $obj->{attribute} blah\n"; # instead of print "Blah ", $obj->get_attribute(), " blah\n";

    Seems to me all you achieve is to obfuscate your code, make it less maintainable, and slow it down.....

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

      The original notes:
      (to) interpolate them inside a string

      Not much of a reason, but there it is.

      It also could be used to speed up an application by developing with his simple data objects and then switching to plain old hashes live.