Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Sorry Geoff, I'm in total agreement with this style guideline. I find it much easier to scan the code when the method calls end in (). I find it especially good in cases where they are chained.
    • ugh... it's chaining where I find them the most superfluous
        my $val = Foo->new->attribute->format;
      just feels much more idiomatic to me than
        my $val = Foo->new()->attribute()->format();
      but ok, you're a reasonable guy, so I'll give in :)
      • Imagine a mixed-case like this:

        my $val = Foo->new->{attribute}->format->{id};

        It can get confusing quickly, especially when people do that horrible "return yourself" method chaining that SOAP-Lite uses. I know I'm in the minority on this though. I just don't think there's any advantage to leaving them off, and it makes your code less consistent.