Skip Menu |

This queue is for tickets about the Pod-Parser CPAN distribution.

Report information
The Basics
Id: 72348
Status: resolved
Priority: 0/
Queue: Pod-Parser

People
Owner: Nobody in particular
Requestors: rsimoes [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.37
Fixed in: (no value)



Subject: English.pm and @ARG
Somehow, English.pm's alternative to @_ doesn't get populated when subclassing from Pod::Parser: package My::Pod::Parser; use strict; use warnings; use Data::Dump; use base 'Pod::Parser'; ... sub command { dd \@ARG; # ["lib/My/Pod/Parser.pm"] dd \@_; # do { # my $a = [ # bless({ # _CUTTING => 0, # ... } package main; my $parser = My::Pod::Parser->new; $parser->parse_from_file($0);
Maybe you need an extra "use English;" in pakage My::Pod::Parser? -Marek On Fri Nov 11 02:02:37 2011, rsimoes wrote: Show quoted text
> Somehow, English.pm's alternative to @_ doesn't get populated when > subclassing from Pod::Parser: > > package My::Pod::Parser; > > use strict; > use warnings; > use Data::Dump; > use base 'Pod::Parser'; > > ... > > sub command { > > dd \@ARG; # ["lib/My/Pod/Parser.pm"] > > dd \@_; # do { > # my $a = [ > # bless({ > # _CUTTING => 0, > # ... > } > > package main; > my $parser = My::Pod::Parser->new; > $parser->parse_from_file($0);
This is a general problem. I did not find any official documentation on this, but in English.pm I found this comment: # The ground of all being. @ARG is deprecated (5.005 makes @_ lexical) So I believe that you cannot use @ARG to get the subroutine args, not in the connection with Pod::Parser, and not anywhere else in modern Perls (5.x with x>5). HTH, Marek