title: How can I wrap a Perl function but still use it as a reference?
body: <p>Considering this code:</p>
  <pre class="lang-perl prettyprint-override"><code>#!/usr/bin/perl
  package p1;
  use Data::Dumper;
  sub dump_it {
      print Dumper @_
  }
  
  package p2;
  local *foo = *p1::dump_it;
  foo('this works');
  
  #local *foo = *p1::dump_it(&quot;but this doesn't&quot;);
  #foo;
  </code></pre>
  <p>I kind of understand, why passing a parameter here can't work, however I think it would be quite practical in some situations.
  Is there a way to make something similar to the commented-out part function? I would not want to wrap the dump_it in another sub, but directly use a reference.</p>