Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Wow. An elightening explanation. One more question though. You say when you're extracting methods for the perl code, "Figure out what local vars it needs and pass them as arguments". Why don't you have to do this for the java code?

As I was writing this, it occurred to me that you don't have to do it because the java one scans your selection for variables and automatically determines which variables you need passed. In which case, I really think that's fairly doable in the perlworld, especially now that we have PPI.

I have to admit, the entire point of this thread was so I could think of something cool to do with PPI, as I think it's a really incredible module.. I just couldn't think of anything useful to do with it!

As an example, if you had this as your code selection:
my $x = frob( $bz ); print $x + $z; foobar( $x );
Using the power of PPI it should be trivial to generate a new method:
sub methodname { my ($bz, $z ) = @_; my $x = frob($bz; print $x + $z; foobar( $x ); }
Is that more or less what you had in mind?

In reply to Re^4: Features missing in perl IDEs? by BUU
in thread Features missing in perl IDEs? by BUU

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-29 14:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found