IPTables-IPv4-DBTarpit
view release on metacpan or search on metacpan
lib/IPTables/IPv4/DBTarpit/Inst.pm view on Meta::CPAN
=cut
sub write_conf {
my($file,$hp,$pre) = @_;
return "argument 2 is not a hash reference" unless ref $hp;
my $W = local *W;
return "could not open $file for write"
unless open($W,'>'.$file);
$file =~ m|([^/]+)$|;
my $whoami = (caller)[1];
print $W qq|# $1 |, scalar localtime(), q|
#
# This configuration file was automatically generated by '|. $whoami .q|'
#
# Don't edit this file, edit '|. $whoami .q|' instead.
#
my $CONFIG = {
|;
foreach(sort keys %$hp) {
next if $pre && $_ !~ /^$pre/;
( run in 2.535 seconds using v1.01-cache-2.11-cpan-800906f7e73 )