It isn't the perfect solution, but my best friend when it comes to changing parameter list and/or renaming Perl methods is the bash command:
find ... -print0 | xargs -0 grep 'mymethodname'
-or-
find ... -print0 | xargs -0 grep -l 'mymethodname'
I use the first when I want to find all the files and lines containing my method name. I use the second when I just want to see which files have such lines. If you aren't familiar with the commands:
- find recursively searches for files. It has a rich set of options you can use to screen out files you aren't interested in. The -print0 option uses the null character to separate file names so you don't have to worry about quoting file names with spaces.
- xargs passes the file list produced by find to grep. The -0 argument tells xargs to expect a null delimited file list.
- grep - most likely you are familiar with this, but it selects lines containing a regex you provide. If you only want to see the file names, but not the lines, use the -l option.
With all the find options, the command line can be quite long so I usually run it in a shell where I can keep history. That way I can simply recall the command via history, changing the method name as needed.
Best, beth
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.