lizmat / IRC-Client

Raku module for building IRC (Internet Relay Chat) clients
Artistic License 2.0
14 stars 7 forks source link

irc-XXX is not valid perl 6 method name #31

Closed AlexDaniel closed 7 years ago

AlexDaniel commented 7 years ago

https://github.com/zoffixznet/perl6-IRC-Client/blob/029c43c63b938c991a10cf27eb75907bc6d8623e/lib/IRC/Client.pm6#L270

For example, in this comment it was recommended to use irc_353, but as far as I can see the actual method name is irc-353.

Unless I misunderstand something, it should be called “irc-n353” or something like that.

zoffixznet commented 7 years ago

I guess it tells you how thorough the test suite for this module is 😂

AlexDaniel commented 7 years ago

It's not that bad, there are several live test suites running on #perl6 :P

In fact, we have tests for whateverables, so we test IRC::Client indirectly as well (a bit).

But yes, this:

-                take 'irc-' ~ $e.command, $event-name;
+                take 'irc-n' ~ $e.command, $event-name;

Solves the problem for me. But of course, it needs documentation changes and tests.