Subject: | clone method shares arrayrefs with original |
The clone() method copies references to the filename and validkeys arrays rather than copying the data of the arrays. This means that this sequence is broken:
$config = ConfigReader::Simple->new("configrc", [qw(Foo Bar Baz Quux)]);
$clone = $config->clone();
$config->add_config_file("foorc");
because "foorc" gets added to the filename list for both instances.