Hi, Monks.

This is first time I'm using B::Deparse so I need some help with it.

Here is code I have (I just want to check code of the $xs):

package WSD::Filter; use 5.006000; use Config; our $VERSION = '1.0'; use FindBin qw($Bin); use B::Deparse; require DynaLoader; @ISA = qw(DynaLoader); my $perlver = '508'; $perlver = '510' if($] >= 5.01); $perlver = '512' if($] >= 5.012); $perlver = '514' if($] >= 5.014); my %v0= (32=>[ '32','32_3', '32_4','32_5', '32_2'], 64=>['64_2', '64_ +3', '64_4', '64']); my $bits = 32; $bits = 64 if($Config{'archname'} =~ /x86_64/ || $Config{'archname'} = +~ /amd64/); my $libref = undef; my $file_version; my @v = @{$v0{$bits}}; while(@v && !$libref) { my $bit = shift @v; $file_version = $perlver.$bit; if (-e "$Bin/Filter$file_version.so") { $libref = DynaLoader::dl_load_file("$Bin/Filter$file_version.s +o"); sleep 1; } } my $symref = DynaLoader::dl_find_symbol($libref, 'boot_WSD__Filter'); my $xs = DynaLoader::dl_install_xsub('WSD::Filter::bootstrap', $symref +); #this is my first time I'm using B::Deparse... #what I'm doing wrong here? my $deparse = B::Deparse->new(); my $body = $deparse->coderef2text($xs); print $body; ########## &$xs('WSD::Filter'); 1;

But I have only ";" as output :-(. What's wrong with my approach?c


In reply to [B::Deparse] Trying to find sub's code by Gangabass

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



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.