|Think about Loose Coupling|
POE::Component::IRC and CTCPby z0d (Hermit)
|on May 05, 2001 at 21:30 UTC||Need Help??|
z0d has asked for the
wisdom of the Perl Monks concerning the following question:
Recently I wrote a simple IRC client with POE::Component::IRC. I fixed the bugs in my client I've found. One day when I was testing it again, it died with "Badly formed CTCP message...". I looked into the module and found the answer:
($name, $args) = $_ =~ /^(\w+)(?: (.*))?/ or die "Badly formed CTCP message: \"$_\""; I spend some minutes to decide whether the modul needs that die or not. Finally I found that it isn't the way it should work. It makes Your client buggy. When some bad guy sends You an illegal CTCP, Your client dies immediately.
My questions are the following:
- do You think that "die" is important here?
- how can I prevent that to trigger? (I don't want to hack the module source)
<-- z0d -->