in reply to Re: A work of art
in thread A work of art

Calling it a bug may be a bit premature. Perhaps %fields holds the default state of a new object, and new isn't intended to take parameters. Those fields should be manipulated otherwise. At the very least, $self isn't a reference to %fields itself, but a copy of the contents of %fields.

There is a completely plausible explanation for this code, IMO. Without greater context, it's impossible to see. Besides, it doesn't, IMO, detract from the rest of the OP's post and probably didn't need to be singled out.

Replies are listed 'Best First'.
Re^3: A work of art
by diotalevi (Canon) on Feb 14, 2006 at 01:04 UTC

    Ya sure. I disagree. Oh well? %fields isn't named like it's supposed to provide defaults, it's named like the author intended it to be more local. If the thing really is some defaults then it ought to look like it. It's not good code, as is.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

      As a work of modern art, it must have been intended to be ugly, flawed, and comment-provoking. ;-)
      --
      Ytrew, who *really* doesn't get modern art...
        ... perl-cubism? or perl-expresionism? ...

        perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'