Skip Menu |

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

Report information
The Basics
Id: 60819
Status: resolved
Priority: 0/
Queue: B-Hooks-Parser

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

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



Subject: Confused by -M with arguments
B::Hooks::Parser is confused when used on the command line with -M that has arguments. Here's a simple example emulating true.pm. package Foo; use B::Hooks::Parser; sub import { my $class = shift; B::Hooks::Parser::inject('1;') } 1; And then on the command line: $ perl -I ~/tmp -MFoo=foo,bar -wle 1 substr outside of string at /usr/local/perl/5.10.1/lib/site_perl/5.10.1/darwin-thread-multi-64int-ld-2level/B/Hooks/Parser.pm line 23. BEGIN failed--compilation aborted. This is means using any module that uses true.pm in a one liner with arguments will blow up. Some instrumentation reveals the problem: $ perl -I ~/tmp -MFoo=foo,bar -wle 1 Line: 'use Foo split(/,/,q' Offset: 30 substr outside of string at /usr/local/perl/5.10.1/lib/site_perl/5.10.1/darwin-thread-multi-64int-ld-2level/B/Hooks/Parser.pm line 26. BEGIN failed--compilation aborted. get_linestr() is not returning the whole line generated by Perl from the -M.
FWIW this no longer effects true.pm. They stopped being a simple wrapper around B::Hooks::Parser a couple weeks ago.
Thanks. Fixed in B-Hooks-Parser-0.10.