Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Assuming that one has access to the commandline one could always use Carp::Always or Devel::SimpleTrace via perl's -M option or perl's PERL5OPT.

If one is interested in the arguments being passed insert an INIT block of the form

INIT { require Data::Dumper; require Scalar::Util; # And now redefine Carp::format_arg so Carp can dump refs too! no warnings qw(once redefine uninitialized); *Carp::format_arg=sub { my $arg_S=shift; my $return_s; if (not defined $arg_S) { # It's an undef $return_s='undef'; } elsif (Scalar::Util::blessed($arg_S)) { # It's an object my $buffer_s; { local $Data::Dumper::Indent=0; local $Data::Dumper::Terse=0; # deparse any CodeRefs local $Data::Dumper::Deparse=ref($arg_S) eq 'CODE'; $buffer_s=Data::Dumper::Dumper($arg_S); $buffer_s=~ s/^\$VAR\d+\s*=\s*//; $buffer_s=~ s/;\s*$//; }; $return_s=$buffer_s; } elsif (ref($arg_S)) { # It's a ref Array, Code or Hash my $buffer_s; { local $Data::Dumper::Indent=1; #local $Data::Dumper::Terse=0; # deparse any CodeRefs local $Data::Dumper::Deparse=ref($arg_S) eq 'CODE'; $buffer_s=Data::Dumper::Dumper($arg_S); $buffer_s=~ s/^\$VAR\d+\s*=\s*//; $buffer_s=~ s/;\s*$//; $buffer_s=~ s/ */ /g if (ref($arg_S) eq 'CODE'); }; $return_s=$buffer_s; } else { $return_s=$arg_S; $return_s=~ s/'/\\'/g; $return_s=Carp::str_len_trim($arg_S,$Carp::Heavy::MaxArgLe +n); $return_s="'$arg_S'" unless $arg_S =~ /^-?[\d.]+\z/; } $return_s=~ s/([[:cntrl:]]|[[:^ascii:]])/sprintf("\\x{%x}",ord +($1))/eg; return $return_s; }; # Carp::format_arg; }

into Carp::Always.

In reply to Re: Finding what called a subroutine by clueless newbie
in thread Finding what called a subroutine by Anonymous Monk

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    [Discipulus]: good morning monks and nuns!
    [Corion]: Hi Discipulus, Happy-the-monk!
    [Corion]: There is demand for an emergency social meeting, as two people from are in Frankfurt on Wednesday - I'll forward the mail in the evening
    [Discipulus]: beer finished in Strasbourg? ;=)
    [Corion]: Discipulus: Yeah, or it got too warm and they hope for colder beer here ;)

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (5)
    As of 2018-07-23 08:18 GMT
    Find Nodes?
      Voting Booth?
      It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

      Results (459 votes). Check out past polls.