in reply to A sub to return the number of listeners on a Shoutcast server
die "Cannot read the buffer. $!" unless defined $n;
Although I don't run "Good Vibes Radio", nor have any experience with it, I wouldn't use "die" on an error, since you're in a sub. I'd rather return the error message and if none, the number of listeners. If you'd use this sub routine in some script to generate some HTML, the user would at least get a somewhat decent error. (if of course you do something usefull with the returned error ;))
Just my €0.02
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: A sub to return the number of listeners on a Shoutcast server
by simonm (Vicar) on Jan 03, 2004 at 17:52 UTC | |
|
Re: Re: A sub to return the number of listeners on a Shoutcast server
by Omeron (Novice) on Jan 04, 2004 at 20:12 UTC |