commit ee880ef054fb6a20c0216900a971f5eda4873d77 from: Izzy Blacklock date: Thu Aug 03 01:02:18 2023 UTC used package globals as default values in ircnow::IO::IRC::new() had a bug with $bots pointing to and empty array. updated to use the package globals as the source for default values in the object. commit - ed5e8478f61205d34eceb440d3fb549d8f2a8850 commit + ee880ef054fb6a20c0216900a971f5eda4873d77 blob - b6b4e6edebb6899c688e17fae7dbcb838eb78e0a blob + bd67767ab7ee74258a40cea1e2df6c5ce8ab4a0d --- lib/IRCNOW/IO/IRC.pm +++ lib/IRCNOW/IO/IRC.pm @@ -19,19 +19,20 @@ our @EXPORT_OK = qw( # Should do something like this in script calling this library # my $call = $IRCNOW::IO::IRC::call; # XXX these need to become an object -our $call; +our $call = {}; our @bots; our $localnet; our @stafflist; +our @networks; sub new { my $class = shift; my $options = {@_}; my $self = { - bots => [], - call => {}, - stafflist => [], - networks => [], + bots => \@bots, + call => $call, + stafflist => \@stafflist, + networks => \@networks, }; # verify we have all required params my @required = qw(networks localnet nick host port pass);