Class-Scaffold
view release on metacpan or search on metacpan
MANIFEST.SKIP view on Meta::CPAN
smoke.yaml
smoketee.txt
sqlnet.log
BUILD.SKIP
COVER.SKIP
CPAN.SKIP
t/000_standard__*
Debian_CPANTS.txt
nytprof.out
# Temp, old, emacs, vim, backup files.
~$
\.old$
\.swp$
\.tar$
\.tar\.gz$
^#.*#$
^\.#
.shipit
# Local files, not to be included
lib/Class/Scaffold/Log.pm view on Meta::CPAN
return unless defined $format and $format ne '';
# make sure there's exactly one newline at the end
1 while chomp $format;
$format .= "\n";
$format = sprintf "(%08d) %s", $$, $format if $self->pid;
$format = sprintf "%s %s", $self->logdate, $format if $self->timestamp;
my $msg = sprintf $format => @args;
# Open and close the file for each line that is logged. That doesn't cost
# much and makes it possible to move the file away for backup, rotation
# or whatver.
my $fh;
if ($self->delegate->test_mode) {
print $msg;
} elsif (defined($self->filename) && length($self->filename)) {
open $fh, '>>', $self->filename
or die sprintf "can't open %s for appending: %s", $self->filename, $!;
print $fh $msg
or die sprintf "can't print to %s: %s", $self->filename, $!;
close $fh
( run in 1.296 second using v1.01-cache-2.11-cpan-49f99fa48dc )