-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Dumper.pm to hint at \( .... ) two birds one stone #22039
base: blead
Are you sure you want to change the base?
Conversation
Welcome to edit my patch.
This needs a version bump |
will be remedied in time, now that Perl has subroutine prototypes. | ||
array or hash. Prepend it with a C<\> to pass its reference instead: | ||
Dumper C<\>(%a, @b, $c), C<\>%e, C<\>@f, C<\>$g. | ||
This will be remedied in time, now that Perl has subroutine prototypes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who is going to remedy this?
At what time?
How do prototypes remedy with this?
Are you thinking of signatures?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps that's a question for the original commit including that statement? Althought history seems to stop here: 823edd9
It seems however to refer to standard prototypes and not the new signatures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point was more that the vibes are wrong. Optimistic use of future tense and prototypes really don't mix in $current_year
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's definitely not a change we will be making. That sentence should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes please remove it or whatever and also tweak my version if you want I'm very welcome.
I guess I'll learn what a version bump is a little later. But just go right ahead.
array or hash. Prepend it with a C<\> to pass its reference instead. This | ||
will be remedied in time, now that Perl has subroutine prototypes. | ||
array or hash. Prepend it with a C<\> to pass its reference instead: | ||
Dumper C<\>(%a, @b, $c), C<\>%e, C<\>@f, C<\>$g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\( ... )
is a list of references to each of the items in the parens. \( @things )
is not a reference to @things
, nor a reference to an anon-array with the items from @things
:
% perl -MData::Dumper -E '
say Dumper \( @ARGV )
' -- two items
$VAR1 = \'two';
$VAR2 = \'items';
\( %things )
does the same with the key/value pairs from the hash:
% perl -MData::Dumper -E '
my %arg = @ARGV;
say Dumper \( %arg )
' -- one pair
$VAR1 = \'one';
$VAR2 = \'pair';
Dumper \(%a, @b, $c)
is not a good example of how to avoid list flattening.
Welcome to edit my patch.