Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Config-MVP CPAN distribution.

Report information
The Basics
Id: 57265
Status: resolved
Priority: 0/
Queue: Config-MVP

People
Owner: Nobody in particular
Requestors: rafl [...] debian.org
Cc:
AdminCc:

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



Subject: blows up when bundles provide config data containing refs which aren't array refs
Date: Thu, 6 May 2010 20:34:03 +0200
To: bug-Config-MVP [...] rt.cpan.org
From: Florian Ragwitz <rafl [...] debian.org>
From Config/MVP/Assembler/WithBundles.pm: # XXX: Clearly this is a hack. -- rjbs, 2009-08-24 for my $name (keys %$payload) { my @v = ref $payload->{$name} ? @{$payload->{$name}} : $payload->{$name}; $section->add_value($name => $_) for @v; } While writing a plugin bundle recently, the above hack bit me. I returned an URI instance instead of a string representing the URI and got a cryptic error outside of my code back. I guess throwing a proper expection when a reference of an unsupported type, i.e. anything that isn't not blessed and an arrayref, would be a reasonable solution. -- BOFH excuse #283: Lawn mower blade in your fan need sharpening
Download signature.asc
application/pgp-signature 189b

Message body not shown because it is not plain text.

I just like saying "throwing a proper expection." The latest commits to Config-MVP will allow you to specify payload as an arrayref. [ $name, $pkg, [ k => v, k => v, k1 => v1 ] When you do this, the type of 'v' will not be considered. This version of Config-MVP will be released at some point in the near future. -- rjbs