3 # This file is part of POE::Component::Client::MPD.
4 # Copyright (c) 2007 Jerome Quelin, all rights reserved.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the same terms as Perl itself.
14 use POE qw[ Component::Client::MPD::Connection ];
18 my $id = POE::Session->create(
20 _start => \&_onpriv_start,
21 _mpd_error => \&_onpriv_mpd_error,
24 POE::Component::Client::MPD::Connection->spawn( {
34 $_[KERNEL]->alias_set('tester'); # increment refcount
37 sub _onpriv_mpd_error {
38 like( $_[ARG0]->error, qr/^connect: \(\d+\) /, 'connect error trapped' );