aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoffix Znet <cpan@zoffix.com>2016-07-29 08:31:21 -0400
committerZoffix Znet <cpan@zoffix.com>2016-07-29 08:31:21 -0400
commit3ce55a107e23106919d1e389b0027030b7161f44 (patch)
treee9dfd7e44f5aaf0126ff1c64dc7f2a3152e706b6
parent835f555b28d1cab5fbefc5230b8877056087909b (diff)
Use better BUILD
-rw-r--r--lib/IRC/Client.pm611
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6
index ea03269..524a680 100644
--- a/lib/IRC/Client.pm6
+++ b/lib/IRC/Client.pm6
@@ -26,11 +26,10 @@ my &colored = try {
} // sub (Str $s, $) { $s };
submethod BUILD (
- :@!filters,
- :@!plugins,
Int:D :$!debug = 0,
-
- :%servers is copy,
+ :$filters = (),
+ :$plugins = (),
+ :$servers = {},
Int:D :$port where 0 <= $_ <= 65535 = 6667,
Str :$password,
Str:D :$host = 'localhost',
@@ -40,6 +39,10 @@ submethod BUILD (
Str:D :$userreal = 'Perl6 IRC Client',
Str:D :$channels = ['#perl6'],
) {
+ @!filters = @$filters;
+ @!plugins = @$plugins;
+ my %servers = %$servers;
+
my %all-conf = :$port, :$password, :$host, :$nick,
:$username, :$userhost, :$userreal, :$channels;