<?xml version="1.0" encoding="windows-1252"?>
<node id="393600" title="Re: Extract subroutines from a Perl script. OR: &quot;Only perl can parse Perl.&quot; But can it help me to do so?" created="2004-09-24 13:24:13" updated="2004-09-25 06:27:34">
<type id="11">
note</type>
<author id="159343">
samtregar</author>
<data>
<field name="doctext">
&lt;blockquote&gt;&lt;i&gt;To make a long story short, is there an easy way (module or whatever) to easily extract subroutines from a Perl script using a Perl script?&lt;/i&gt;&lt;/blockquote&gt;
&lt;p&gt;
To make a long answer short, no.  Perl is a context-sensitive language which defies any attempt to write a simple parser.  You'll either have to settle for something simple that doesn't handle edge cases or something complex that does.
&lt;p&gt;
As an aside, you might be intersted in this take on "only perl can parse Perl": [id://289111]
&lt;p&gt;
-sam
</field>
<field name="root_node">
393419</field>
<field name="parent_node">
393419</field>
</data>
</node>
