in reply to Refactoring Perl #4 - Replace Temp with Query

Neither of your to-be-refactored and refactored code parses under Perl 4.

What am I missing?

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
  • Comment on Re: Refactoring Perl 4 - Replace Temp with Query

Replies are listed 'Best First'.
Re^2: Refactoring Perl 4 - Replace Temp with Query
by agianni (Hermit) on Jul 30, 2007 at 12:48 UTC

    That is refactoring Perl 4, as in the latest in a series, not refactoring version 4 of the Perl language. Sorry if that was confusing. Many of these examples are explicitly object oriented, so obviously they won't parse under Perl 4 or earlier.

    perl -e 'split//,q{john hurl, pest caretaker}and(map{print @_[$_]}(joi +n(q{},map{sprintf(qq{%010u},$_)}(2**2*307*4993,5*101*641*5261,7*59*79 +*36997,13*17*71*45131,3**2*67*89*167*181))=~/\d{2}/g));'
      That is refactoring Perl 4, as in the latest in a series

      I'm looking forward to "refactoring Perl 6" :-P

      My previous post has been a (unfunny?) hint at the title being misleading. IMHO the dash is misplaced, and saying "refactoring Perl - 4. Replace Temp with Query" would avoid that type of "confusion" :-)

      --shmem

      _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                    /\_¯/(q    /
      ----------------------------  \__(m.====·.(_("always off the crowd"))."·
      ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

        Definitely, you had me confused initially, but your humor was appreciated :) I have actually gone back and updated the titles of the root nodes to place number signs before the number in the series and will utilize that convention from here on out.

        perl -e 'split//,q{john hurl, pest caretaker}and(map{print @_[$_]}(joi +n(q{},map{sprintf(qq{%010u},$_)}(2**2*307*4993,5*101*641*5261,7*59*79 +*36997,13*17*71*45131,3**2*67*89*167*181))=~/\d{2}/g));'