Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

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

Doesn't happen for me with following code.

use strict; use warnings; package Package1; use Data::Dumper; sub some_other_method { print Dumper @_; } package Package2; our @ISA = 'Package1'; sub some_other_method { die "Shouldn't be called!"; } sub quick_method { return shift->SUPER::some_other_method(@_); } sub new { bless {}, shift; } Package2->new->quick_method( 1, 2, 3 );

It returns (correctly) following result (I've checked it in Perl v5.8.8, v5.10.1, v5.14.2, v5.16.1 and blead).

$VAR1 = bless( {}, 'Package2' ); $VAR2 = 1; $VAR3 = 2; $VAR4 = 3;

But, I think that so simple code won't show the bug - it happens in more complex cases (the warning you have got is internal Perl warning you should never see, but you saw according to perldiag - this is possibly a Perl bug). If you can, try to make testcase which shows the bug happening (by shortening the program to only have what you need to show bug). Also, there is chance that some XS module breaks something.


In reply to Re: Don't get too cute about modifying and using @_ in the same line of code by GlitchMr
in thread Don't get too cute about modifying and using @_ in the same line of code by aufflick

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2023-12-06 20:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (31 votes). Check out past polls.

    Notices?