Skip Menu |

This queue is for tickets about the Module-Extract-Namespaces CPAN distribution.

Report information
The Basics
Id: 67720
Status: resolved
Priority: 0/
Queue: Module-Extract-Namespaces

People
Owner: bdfoy [...] cpan.org
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.14
Fixed in: 0.14_02



Subject: Unexpected behaviour with 5.14 style package declarations.
Perl 5.14 introduces a new Package specification which currently renders confusing behaviour with this module.

"On failure it returns nothing, but you have to check with error to see if that is really an error or a file with no namespaces in it."

Sadly, this module produces neither nothing ( it returns a list with 1 item being 'undef' ) or produces an error in this scenario.

( Module::Extract::VERSION likely has a similar problem, but I haven't crossed that bridge yet )

I have a test in my github fork that replicates the situation I am seeing, and hopefully it is useful to you.

Thanks.

On Sat Apr 23 19:27:14 2011, KENTNL wrote: Show quoted text
I've uploaded 0.14_01, which has a PPI fix.
On 2011-04-30 01:12:59, BDFOY wrote:
Show quoted text
> On Sat Apr 23 19:27:14 2011, KENTNL wrote:
>
>
> I've uploaded 0.14_01, which has a PPI fix.

Thanks =).

The tests fail for me on 0.14_01 , due to it not being able to extract packages other than the first package declared, but this solution is in a good enough state to start using.

not ok 17 - Extracts right namespaces for NewPackageSyntax.pm
ok 18 - Corpus file [ corpus/None.pm ] exists

Show quoted text
#   Failed test 'Extracts right namespaces for NewPackageSyntax.pm'
#   at t/corpus.t line 32.
#     Structures begin differing at:
#          $got->[1] = Does not exist
#     $expected->[1] = 'Buster'

not ok 23 - Extracts right namespaces for NewPackageSyntax.pm

Show quoted text
#   Failed test 'Extracts right namespaces for NewPackageSyntax.pm'
#   at t/corpus.t line 54.
#     Structures begin differing at:
#          $got->[1] = Does not exist
#     $expected->[1] = ARRAY(0x1fafa80)


I left out part of the PPI monkeypatching, which I've re-added for 0.14_02. We'll see how that goes.
Tests passing for me with this release =). Thanks again.