Apache-Logmonster
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
use lib 'lib';
sub MY::postamble
{
'LOGMONSTER = /Users/Shared/Sites/www.tnpi.net/internet/www/logmonster
docs:
pod2text bin/logmonster.pl > README
pod2text doc/FAQ.pod > FAQ
pod2text doc/Changes.pod > Changes
bin/logmonster.pl view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use lib 'lib';
use English qw( -no_match_vars );
use Getopt::Long;
use Pod::Usage;
use Apache::Logmonster '3.07';
use Apache::Logmonster::Utility 5;
my %command_line_options = (
'bump:i' => \my $bump, # an optional time offset
'clean!' => \my $clean, # ability to override conf file
lib/Apache/Logmonster.pm view on Meta::CPAN
use Carp;
use Compress::Zlib;
use Cwd;
#use Data::Dumper;
use Date::Parse;
use FileHandle;
use File::Basename;
use File::Copy;
use Regexp::Log;
use lib 'lib';
use Apache::Logmonster::Utility;
use Regexp::Log::Monster;
my ( $util, $err, %fhs, $debug );
sub new {
my $class = shift;
$debug = shift || 0;
my $self = {
conf => undef,
lib/Apache/Logmonster.pm view on Meta::CPAN
return $self->{conf} if (defined $self->{conf} && ref $self->{conf});
$self->{conf} = $util->parse_config( $file || 'logmonster.conf' );
return $self->{conf};
};
sub get_util {
my $self = shift;
return $util if ref $util;
use lib 'lib';
require Apache::Logmonster::Utility;
$self->{util} = $util = Apache::Logmonster::Utility->new( debug => $self->{debug} );
return $util;
};
sub report_hits {
my $self = shift;
my $logdir = shift;
my $debug = $self->{'debug'};
lib/Apache/Logmonster/Utility.pm view on Meta::CPAN
use English qw( -no_match_vars );
use File::Basename;
use File::Copy;
use File::Path;
use File::Spec;
use File::stat;
use Params::Validate qw(:all);
use Scalar::Util qw( openhandle );
use URI;
use lib 'lib';
use vars qw/ $log %std_opts /;
sub new {
my $class = shift;
# globally scoped hash, populated with defaults as requested by the caller
%std_opts = (
'fatal' => { type => BOOLEAN, optional => 1, default => 1 },
'debug' => { type => BOOLEAN, optional => 1, default => 1 },
'quiet' => { type => BOOLEAN, optional => 1, default => 0 },
t/00.load.t view on Meta::CPAN
use Test::More tests => 4;
use lib 'lib';
BEGIN {
use_ok( 'Apache::Logmonster' );
use_ok( 'Apache::Logmonster::Utility' );
}
diag( "Testing Apache::Logmonster $Apache::Logmonster::VERSION" );
ok( Apache::Logmonster->new(), 'new Apache::Logmonster');
ok( Apache::Logmonster::Utility->new(), 'new Apache::Logmonster::Utility');
t/Filehandle.t view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests=>2;
use lib "lib";
BEGIN {
use_ok('FileHandle');
}
require_ok('FileHandle');
t/Logmonster.t view on Meta::CPAN
use Cwd;
use Data::Dumper;
use English qw( -no_match_vars );
use Test::More;
if ( $OSNAME =~ /cygwin|win32|windows/i ) {
plan skip_all => "no windows support";
};
use lib 'lib';
use lib 'inc';
use_ok( 'Apache::Logmonster' );
use_ok( 'Apache::Logmonster::Utility' );
# let the testing begin
# basic OO mechanism
my $logmonster = Apache::Logmonster->new(0);
ok ($logmonster, 'new logmonster object');
t/Utility.t view on Meta::CPAN
use strict;
#use warnings;
use lib "lib";
use Cwd;
use English qw( -no_match_vars );
use Test::More;
if ( $OSNAME =~ /cygwin|win32|windows/i ) {
plan skip_all => "no windows support";
};
my $deprecated = 0; # run the deprecated tests.
( run in 0.529 second using v1.01-cache-2.11-cpan-87723dcf8b7 )