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

Report information
The Basics
Id:
13062
Status:
resolved
Priority:
Low/Low

People
Owner:
Nobody in particular
Requestors:
muskrat [...] mindless.com
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
(no value)
Fixed in:
(no value)



Subject: Newlines Prevent Finding Dependencies
When a use statement spans more than one line, the dependency is not found. I created an md_test directory in my home directory. I created three files in that directory: MyModule.pm, my_script_1.pl and my_script_2.pl. MyModule.pm ----------- package MyModule; use 5.001; use strict; use warnings; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(some_function another_function); sub some_function { print "This is some_function in MyModule.\n"; } sub another_function { print "This is another_function in MyModule.\n"; } 1; my_script_1.pl -------------- #!/usr/bin/perl use strict; use warnings; use MyModule qw(some_function); some_function(); my_script_2.pl -------------- #!/usr/bin/perl use strict; use warnings; use MyModule qw(some_function another_function); some_function(); another_function(); I ran the indexer from my home directory: indexer.plx -o ./md_test.dat -t -b md_test Then I compared the dumps: dumper.plx -o ./md_test.dat -i my_script_1.pl dumper.plx -o ./md_test.dat -i my_script_2.pl my_script_1.pl shows the dependency on MyModule.pm but my_script_2.pl does not. I'm using Module-Dependency-1.13 on perl v5.8.3 built for i686-linux.
From: muskrat@mindless.com
[MMUSGROVE - Thu Jun 2 15:41:07 2005]: The regex on line 151 of Module::Dependency::Indexer.pm needs to be updated to allow the use statement to span multiple lines. It appears that simply adding /s will correct this but you might want to test other alternatives.
[MMUSGROVE - Thu Jun 2 15:47:28 2005]:
Show quoted text
> [MMUSGROVE - Thu Jun 2 15:41:07 2005]: > > The regex on line 151 of Module::Dependency::Indexer.pm needs to be > updated to allow the use statement to span multiple lines. It appears > that simply adding /s will correct this but you might want to test other > alternatives. >
Hmm, I was about to add that the same fix needs to be applied to line 219 but then I noticed that you are processing the files line by line.
Fixed in 1.83, along with many other issues.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.