# from David E. Wheeler # on Saturday 27 September 2008 22:36: >I somehow doubt that the ternary made it difficult to review. When I >change it, it will be very nearly identical. > >> I think this needs to seek "one of the other ways to do it": >> # Allow to work in class or object context. >> my $x = do { no strict 'refs'; $self->{properties} }; >> return $x->{$property} unless @_; > >Oh, big time. But that was how I got the tests to pass. I have no idea >why properties need to work in a class context.
Yeah. This is what I'm about to commit. I think it needs to just go with "no strict 'refs'" in each of those blocks (with a comment mentioning "class method"!) and then we'll triage the symbolic ref issue in another go. http://scratchcomputing.com/tmp/Base.pm.extract_accessors.patch -- "...the bourgeoisie were hated from both ends: by the proles, because they had all the money, and by the intelligentsia, because of their tendency to spend it on lawn ornaments." --Neal Stephenson --------------------------------------------------- http://scratchcomputing.com ---------------------------------------------------