Modularize registering optional p0f hooks

This commit is contained in:
Jared Johnson 2014-12-11 13:48:27 -06:00
parent f276afc41c
commit bf1d6baf49

View File

@ -166,6 +166,11 @@ sub register {
foreach (keys %args) {
$self->{_args}->{$_} = $args{$_};
}
$self->register_headers();
}
sub register_headers {
my ( $self ) = @_;
my $enabled = $self->{_args}{add_headers};
$enabled = 'true' if ! defined $enabled;
return if $enabled =~ /false/i;