Re: invalid installdirs values patch

[email protected] (Eric Wilhelm)
Newsgroups perl.module.build
Message-ID <[email protected]>
# from David E. Wheeler
# on Saturday 27 September 2008 13:55:

>> Could we have that with the original indentation please?
>
>Which is what? I can't make heads or tails of it.

Ack.  I should have said "without the 32-line ternary".  Please.  I'm 
all for refactoring, but some of that should really come in more than 
one piece.

Otherwise it is very difficult to review.

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 @_;

When you have two 'it's, one of them should have a name
    for (reverse shift->_mb_classes) {
      @out{ keys %{ $valid_properties{$_} } } = map {
          $_->()
      } values %{ $valid_properties{$_} };
    }

But, I have doubts about the "everything is a sub" approach here.  If 
the default is a subref, that implies that we always call it (e.g. 
creating a new anonymous ref ala moose) rather than ever holding the 
value -- and if that were the case then valid_properties_defaults() 
would not exist?  That is, take a look at _set_defaults().

Thanks,
Eric
-- 
Turns out the optimal technique is to put it in reverse and gun it.
--Steven Squyres (on challenges in interplanetary robot navigation)
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.