Skip Menu |

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

Report information
The Basics
Id: 13758
Status: resolved
Priority: 0/
Queue: Module-Build

Owner: Nobody in particular
Requestors: jonasbn [...]

Bug Information
Severity: Unimportant
Broken in: 0.2611
Fixed in: (no value)

Subject: Problem with example in POD
Download (untitled) / with headers
text/plain 845b
Hello, I have a problem with an example provided in the POD. I am using Module-Build-0.2611 The autofeatures example does not seem to work: auto_features => { pg_support => { description => "Interface with Postgres databases", requires => q{ DBD::Pg >= 23.3 && DateTime::Format::Pg }, }, This example take from the POD does not work, but changing the 'requires' to: { DBD::Pg => 1.32 }, Not quoting it seem to work just fine. The error coming from the module is the following: % perl Build.PL Checking whether your kit is complete... Looks good Can't use string (" DBD::Pg => 1.32 ") as a HASH ref while "strict refs" in use at /Library/Perl/5.8.1/Module/Build/ line 808. This is my perl version: This is perl, v5.8.1-RC3 built for darwin-thread-multi-2level Thanks for a magnificent module btw, jonasbn
Download (untitled) / with headers
text/plain 823b
Hi Jonas, Thanks for bringing this to my attention. You're right, the docs are wrong. I'm changing the documentation to the following: my $b = Module::Build->new ( ... other stuff here... auto_features => { pg_support => { description => "Interface with Postgres databases", requires => { 'DBD::Pg' => 23.3, 'DateTime::Format::Pg' => 0 }, }, mysql_support => { description => "Interface with MySQL databases", requires => { 'DBD::mysql' => 17.9, 'DateTime::Format::MySQL' => 0}, }, ); Note that in some versions of perl you can write Foo::Bar => 23.2, but in other versions you must explicitly quote the module, i.e. 'Foo::Bar' => 23.3. -Ken

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to