I have developed a source filter for perl based on the UFC program for linux, it doesnt appear to have any bugs in it, other than when the script that calls it is run it does nothing. An example of a script that is compiled is below.
#!/usr/bin/perl use NWLoader; 6563636060604b6e4b0f45344862271900030a2204456e5e43350272111e4b534f7048 +6f445a0b6643411

the uncompiled version is:
#!/usr/bin/perl use NWLoader; $user_id = $ARGV[0]; $customer_dir = $ARGV[1]; $domain_name = $ARGV[2]; $archive = $ARGV[3]; $newer_option = $ARGV[4]; chdir "$customer_dir/$domain_name"; system "tar czv --exclude='archives' $newer_option *"; exit 0;

when we try to run this we get nothing, if given the right variables it should create a tar backup file, but it doesnt do anything. the filter consists of a perl module that loads a C filter. The code of the Perl Module is below.
package NWLoader; require 5.002 ; require DynaLoader; require Exporter; use Carp ; use strict; use vars qw($VERSION @ISA @EXPORT) ; @ISA = qw(Exporter DynaLoader); @EXPORT = qw( filter_add ); $VERSION = "0.01" ; sub filter_add { my $obj = 0 ; #Did we get a code reference? my $coderef = (ref $obj eq 'CODE') ; #If the parameter isn't already a reference, make it one. $obj = \$obj unless ref $obj ; $obj = bless ($obj, (caller)[0]); #finish off the installation of the filter in C. NWLoader::real_import($obj,(caller)[0],""); } sub import { filter_add( ); } bootstrap NWLoader $VERSION; 1; __END__

Now the question is, is there a way to place something in here or another filter after this filter that will during development allow us to see what is actually being passed to the perl compiler?

In reply to Method to test output of Perl Source filter? by aventix

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.