From 9635bbe16ee1e8409fc6377bde79bfde2f8269e8 Mon Sep 17 00:00:00 2001 From: jq Date: Sun, 13 May 2007 11:59:17 +0000 Subject: [PATCH] [project @ 6070] - postbacks should call back _mpd_result, not _send... - ... and should not coerce array refs to hash refs. ok, now stats works! \o/ --- lib/POE/Component/Client/MPD/Commands.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/POE/Component/Client/MPD/Commands.pm b/lib/POE/Component/Client/MPD/Commands.pm index 07e9f32..ee5abbc 100644 --- a/lib/POE/Component/Client/MPD/Commands.pm +++ b/lib/POE/Component/Client/MPD/Commands.pm @@ -20,7 +20,9 @@ package POE::Component::Client::MPD::Commands; use strict; use warnings; -use POE qw[ Component::Client::MPD::Message ]; +use POE; +use POE::Component::Client::MPD::Message; +use POE::Component::Client::MPD::Stats; use base qw[ Class::Accessor::Fast ]; # -- MPD interaction: general commands @@ -109,10 +111,11 @@ sub _onpub_stats { # statistics of MPD. # sub _onpriv_stats_postback { - my $msg = $_[ARG0]; - my $stats = POE::Component::Client::MPD::Stats->new( $msg->data ); + my $msg = $_[ARG0]; + my %stats = @{ $msg->data }; + my $stats = POE::Component::Client::MPD::Stats->new( \%stats ); $msg->data($stats); - $_[KERNEL]->yield( '_send', $msg ); + $_[KERNEL]->yield( '_mpd_data', $msg ); } -- 2.11.4.GIT