App-Sysadmin-Log-Simple

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

  ],
  "dist_name" => "App-Sysadmin-Log-Simple",
  "dist_version" => "0.009",
  "license" => "perl",
  "module_name" => "App::Sysadmin::Log::Simple",
  "recommends" => {},
  "recursive_test_files" => 1,
  "requires" => {
    "Carp" => 0,
    "Config::General" => 0,
    "DateTime" => 0,
    "DateTime::TimeZone" => 0,
    "File::Find::Rule" => 0,
    "File::HomeDir" => 0,
    "Getopt::Long" => 0,
    "HTTP::Tiny" => 0,
    "IO::Pager" => 0,
    "IO::Socket::INET" => 0,
    "Module::Pluggable" => 0,
    "Net::Twitter::Lite::WithAPIv1_1" => 0,
    "Path::Tiny" => 0,
    "Pod::Usage" => 0,

Changes  view on Meta::CPAN

  - Give up on Win32 support
  - Rename "log" executable to "sysadmin-log" (so use uninst=1) [gh-14]
  - Switch from File::Spec to Path::Tiny (<3!)
  - Use Net::Twitter::Lite::WithAPIv1_1
  - Add HTTP logger (gh-16; thanks djzort!)

0.005     2012-06-05
  - Remove perl5i - too slow
  - Make the UDP stuff work right
  - Improve a few minor design decisions
  - Add DateTime::TimeZone dependency
  - Fix the Twitter plugin
  - Pass do_{twitter,udp,file} to log with that plugin

0.004     2011-05-07
  - Major rewrite, including the beginnings of a pluggable architecture

0.003     2011-03-20
  - Increase minimum version of File::Path required to 2.07 for make_path()

0.002     2011-03-12

META.json  view on Meta::CPAN

            "Test::CPAN::Meta" : "0",
            "Test::Kwalitee" : "1.08",
            "Test::Pod" : "1.41",
            "Test::Pod::Coverage" : "1.08"
         }
      },
      "runtime" : {
         "requires" : {
            "Carp" : "0",
            "Config::General" : "0",
            "DateTime" : "0",
            "DateTime::TimeZone" : "0",
            "File::Find::Rule" : "0",
            "File::HomeDir" : "0",
            "Getopt::Long" : "0",
            "HTTP::Tiny" : "0",
            "IO::Pager" : "0",
            "IO::Socket::INET" : "0",
            "Module::Pluggable" : "0",
            "Net::Twitter::Lite::WithAPIv1_1" : "0",
            "Path::Tiny" : "0",
            "Pod::Usage" : "0",

META.yml  view on Meta::CPAN

meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: 1.4
name: App-Sysadmin-Log-Simple
no_index:
  directory:
    - inc
requires:
  Carp: 0
  Config::General: 0
  DateTime: 0
  DateTime::TimeZone: 0
  File::Find::Rule: 0
  File::HomeDir: 0
  Getopt::Long: 0
  HTTP::Tiny: 0
  IO::Pager: 0
  IO::Socket::INET: 0
  Module::Pluggable: 0
  Net::Twitter::Lite::WithAPIv1_1: 0
  Path::Tiny: 0
  Pod::Usage: 0

Makefile.PL  view on Meta::CPAN

  },
  "DISTNAME" => "App-Sysadmin-Log-Simple",
  "EXE_FILES" => [
    "bin/sysadmin-log"
  ],
  "LICENSE" => "perl",
  "NAME" => "App::Sysadmin::Log::Simple",
  "PREREQ_PM" => {
    "Carp" => 0,
    "Config::General" => 0,
    "DateTime" => 0,
    "DateTime::TimeZone" => 0,
    "File::Find::Rule" => 0,
    "File::HomeDir" => 0,
    "Getopt::Long" => 0,
    "HTTP::Tiny" => 0,
    "IO::Pager" => 0,
    "IO::Socket::INET" => 0,
    "Module::Pluggable" => 0,
    "Net::Twitter::Lite::WithAPIv1_1" => 0,
    "Path::Tiny" => 0,
    "Pod::Usage" => 0,

lib/App/Sysadmin/Log/Simple.pm  view on Meta::CPAN

package App::Sysadmin::Log::Simple;
use strict;
use warnings;
use v5.10.1;
# ABSTRACT: application class for managing a simple sysadmin log
our $VERSION = '0.009'; # VERSION

use autodie qw(:file :filesys);
use DateTime;
use Carp;
use Module::Pluggable
    search_path => [__PACKAGE__],
    instantiate => 'new';


sub new {
    my $class = shift;
    my %opts  = @_;
    my $today = DateTime->now;
    if ($opts{date}) {
        my ($in_year, $in_month, $in_day) = split(m{/}, $opts{date});
        my $in_date = DateTime->new(
            year  => $in_year,
            month => $in_month,
            day   => $in_day,
        ) or croak "Couldn't understand your date - use YYYY/MM/DD\n";
        croak "Cannot use a date in the future\n" if $in_date > $today;
        $today = $in_date;
    }

    return bless {
        do_twitter  => $opts{do_twitter} // 0,

lib/App/Sysadmin/Log/Simple/File.pm  view on Meta::CPAN

=item index_preamble

This is a string to place at the top of the index page.

=item view_preamble

This is a string to prepend when viewing the log files.

=item date

This is a DateTime object for when the log entry was made I<or> for specifying
which date's log file to view, depending on the mode of operation.

=back

=head2 view

This allows users to view a log file in a pager provided by L<IO::Pager>,
typically L<less(1)>.

=head2 log



( run in 0.306 second using v1.01-cache-2.11-cpan-05444aca049 )