[Pdx-pm] deparse question

Ovid publiustemp-pdxpm at yahoo.com
Mon Aug 8 17:44:27 PDT 2005


--- Kris Bosland <krisb at ring.org> wrote:

> Anyway, for debugging, I want to deparse the sub I create or get. 
> Can I
> send a CODE to B::Deparse, instead of the whole program?

Yes.  I do this frequently.  See "USING B::Deparse AS A MODULE" in
"perldoc B::Deparse"

  use B::Deparse;
  my $deparse = B::Deparse->new("-p", "-sC");
  print $deparse->coderef2text(\&func);

Cheers,
Ovid

-- 
If this message is a response to a question on a mailing list, please send
follow up questions to the list.

Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/


More information about the Pdx-pm-list mailing list