
Win32::FirewallParser - Microsoft Windows XP SP2 Firewall Log Parser

use Win32::FirewallParser;
my $obj = new Win32::FirewallParser;
$obj->setHandler(\&printLine);
$obj->parseFile();
sub printLine {
my $data = shift;
for my $key (keys %{$data}) {
printf "%10s => %s\n", $key, $data->{$key};
}
print "\n";
}

Simple module for parsing Microsoft Windows XP SP2 Firewall log files.

No constructor parameters required.

This method sets a handler in which a subroutine can be called per line in the log file. For backwards compatibility purposes, this method can still be used, although using the setHandler() member function will cause the package to override any previously set handlers. To add to the list of handlers, use the addHandler() member function instead.
The handler subroutine takes one parameter, a hash reference, which contains the data of the current line in the log that the parser is up to.
Adds a handler function to the list of handlers to be called for each line in the log file. To override any previous handler functions, use the setHandler() member function instead.
The handler subroutine takes one parameter, a hash reference, which contains the data of the current line in the log that the parser is up to.
Removes a handler function from the list. A reference to the callback function is expected as a parameter.
Start parsing a file. If no parameter is specified, the default log file path using the environmental variable SystemRoot, %SystemRoot%/pfirewall.log, will be used.

Luke Triantafyllidis <ltriant@cpan.org>

Copyright (C) 2005-2009 Luke Triantafyllidis
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2005-11-07 0.01 Beta release. 2006-03-24 0.02 Added tests, fixed POD errors, added multiple handler suppport. 2009-04-02 0.03 Fixed no_pod_errors.t to check if Test::Pod is available first.