Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Refactoring Perl 1 - Extract Method

by FunkyMonk (Canon)
on Jun 25, 2007 at 18:06 UTC ( #623220=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    (defun refactor-extract ()
      "Change region into a subroutine"
    ...
    
      (shell-command-on-region (point) (mark) "./refactor-extract" t)
      )
    
  2. or download this
    #!/usr/bin/perl
    
    ...
    my $code = join '', <>;
    my $name = "refactored_" . sprintf( "%04d", rand() * 10000 );
    print join "\n", Devel::Refactor->new->extract_subroutine( $name, $cod
    +e );
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://623220]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2014-12-26 18:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (174 votes), past polls