Skip Menu |

This queue is for tickets about the Winamp-Control CPAN distribution.

Report information
The Basics
Id: 2905
Status: resolved
Priority: 0/
Queue: Winamp-Control

People
Owner: muenalan [...] cpan.org
Requestors: murat.uenalan [...] gmx.de
Cc:
AdminCc:

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



Subject: Winamp::Control
[Note: This is a copy from a mail the author received] Hey, muenalan... Very nice tool, Winamp::Control but *please* rethink the way errors are handled. Or tell me how I can differentiate between an error and the first track in the playlist. getlistpos (requires Winamp 2.05+) action: Gets the current index of the play list. note: The list is zero indexed so track 1 is 0. argument: none. return: List position or 0 on error. example: $winamp->getlistpos; Or am I missing the point ? another point for which I fell for the third time now. Parameters passed as "foo(a => 1)" instead of "foo(1)". Seem like it's easier for you, Winamp::Control is just a sort of "get the function name and pass it to httpQ". Isn't it possible to also detect the parameters better? :Zefiro: www.Zefiro.de
Hi, my answer is below. Thank you for your valuable feedback, Murat PS: Please consider using rt.cpan.org to report feature request or bugs. It has some valuable pros. [snip] Show quoted text
> but *please* rethink the way errors are handled.
Yes. This could be improved. I must admit i never used the module seriously enough to find that unpleasing. Show quoted text
> Or tell me how I can differentiate between an error and the > first track in the playlist. > > getlistpos (requires Winamp 2.05+) > action: Gets the current index of the play list. > note: The list is zero indexed so track 1 is 0. > argument: none. > return: List position or 0 on error. > > example: $winamp->getlistpos; > > > Or am I missing the point ?
No. Actually i borrowed the documentation from the httpQ plugin. So read at http://www.kostaa.com/winamp/commands.html#GETLISTPOS that the author of httpQ had done a typo/mistake. Generally it will return "undef" if it fails on the communication level (module<->httpQ). Maybe that also true for errors. warn "An error occured" unless defined $winamp->getlistpos; Please report me what happened. Show quoted text
> > > > > another point for which I fell for the third time now. > Parameters passed as "foo(a => 1)" instead of "foo(1)". Seem > like it's easier for you, Winamp::Control is just a sort of > "get the function name and pass it to httpQ". Isn't it > possible to also detect the parameters better?
This is work. Currently i have no energy for that. You could help me. If you read the docu and provide me a hash with following structure my $fopts = { foo => [ a => 'INTEGER', b => 'STRING' ], bar => ... }; i will update the module with improved argument handling+checking. Yes, you should really use the keyword "INTEGER" and "STRING", because i will send that to Data::Type (CPAN). Show quoted text
> > > :Zefiro: > www.Zefiro.de > >