Skip Menu |

This queue is for tickets about the Audio-MPD-Common CPAN distribution.

Report information
The Basics
Id: 50973
Status: resolved
Priority: 0/
Queue: Audio-MPD-Common

People
Owner: jquelin [...] cpan.org
Requestors: davidp [...] preshweb.co.uk
Cc:
AdminCc:

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



Subject: Date expected to be an Int in A::M::C::Item::Song
Audio::MPD::Common::Item::Song expects the date to be an Int, which was causing an exception. Fixed by changing from Int to Str: [davidp@supernova:/usr/local/share/perl/5.10.0/Audio/MPD/Common/Item]$ diff -u Song.pm.orig Song.pm --- Song.pm.orig 2009-10-30 15:27:33.326804707 +0000 +++ Song.pm 2009-10-30 15:27:45.442808053 +0000 @@ -30,7 +30,7 @@ has album => ( is=>'rw', isa=>'Str' ); has artist => ( is=>'rw', isa=>'Str' ); -has date => ( is=>'rw', isa=>'Int' ); +has date => ( is=>'rw', isa=>'Str' ); has disc => ( is=>'rw', isa=>'Str' ); has file => ( is=>'rw', isa=>'Str', required=>1 ); has genre => ( is=>'rw', isa=>'Str' ); The full trace, in case it's useful: [error] Caught exception in MusicQueue::Controller::Root->index "Attribute (date) does not pass the type constraint because: Validation failed for 'Int' failed with value 2007-09-18 at /usr/local/share/perl/5.10.0/Moose/Meta/Attribute.pm line 774 Moose::Meta::Attribute::_coerce_and_verify('Moose::Meta::Attribute=HASH(0xa94ca90)', '2007-09-18', 'Audio::MPD::Common::Item::Song=HASH(0xae1d408)') called at /usr/local/share/perl/5.10.0/Moose/Meta/Attribute.pm line 426 Moose::Meta::Attribute::initialize_instance_slot('Moose::Meta::Attribute=HASH(0xa94ca90)', 'Moose::Meta::Instance=HASH(0xa969140)', 'Audio::MPD::Common::Item::Song=HASH(0xae1d408)', 'HASH(0xae1da68)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Class.pm line 364 Class::MOP::Class::_construct_instance('Moose::Meta::Class=HASH(0xa934b78)', 'HASH(0xae1da68)') called at /usr/local/lib/perl/5.10.0/Class/MOP/Class.pm line 351 Class::MOP::Class::new_object('Moose::Meta::Class=HASH(0xa934b78)', 'HASH(0xae1da68)') called at /usr/local/share/perl/5.10.0/Moose/Meta/Class.pm line 205 Moose::Meta::Class::new_object('Moose::Meta::Class=HASH(0xa934b78)', 'HASH(0xae1da68)') called at /usr/local/share/perl/5.10.0/Moose/Object.pm line 28 Moose::Object::new('Audio::MPD::Common::Item::Song', 'HASH(0xae1d298)') called at /usr/local/share/perl/5.10.0/Audio/MPD/Common/Item.pm line 34 Audio::MPD::Common::Item::new('Audio::MPD::Common::Item', 'Album', 'Metro Station', 'Time', 180, 'Id', 1388, 'Genre', 'Rock', 'file', 'Misc Collections/Metro Station - Shake It.mp3', 'Artist', 'Metro Station', 'Date', '2007-09-18', 'Pos', 1259, 'Title', 'Shake It', 'Track', '4/10', ...) called at /usr/local/share/perl/5.10.0/Audio/MPD.pm line 178 Audio::MPD::_cooked_command_as_items('Audio::MPD=HASH(0xacfcaf8)', 'playlistinfo\x{a}') called at /usr/local/share/perl/5.10.0/Audio/MPD/Playlist.pm line 55
soory for not answering before, but i did not get the mail (i don't know why). anyway, it's fixed since version 1.093120 - thanks for reporting. note: you can clone the repository from gthub, and send me pull requests. http://github.com/jquelin/audio-mpd-common/