Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Extract subroutines from a Perl script. OR: "Only perl can parse Perl." But can it help me to do so?

by hv (Prior)
on Sep 24, 2004 at 10:57 UTC ( #393448=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      use B::Deparse;
      $deparse = B::Deparse->new("-p", "-sC");
      $body = $deparse->coderef2text(\&func);
    
  2. or download this
      zen% perl -MB::Deparse -MCarp -wle 'print B::Deparse->new("-p","-sC"
    +)->coderef2text(\&Carp::confess)'
      {
    ...
          die(longmess(@_));
      }
      zen%
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2023-03-30 08:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (74 votes). Check out past polls.

    Notices?