NAME

Log::Sigil - show warnings with sigil prefix

SYNOPSIS

use Log::Sigil;
my $log = Log::Sigil->new;

$log->quiet( 1 ) if ! DEBUG;

$log->warn( "hi there." );                  # -> ### hi there.
$log->warn( "a prefix will be changeed." ); # -> --- a prefix will be changed.

package Foo;
sub new  { $log->bias( 1 ); bless { }, shift }
sub warn { $log->warn( @_ ) }

package main;
Foo->new->warn( "foo" );

DESCRIPTION

Log::Sigil is a message formatter. Formatting adds a few prefix, and prefi is a sigil. This module just add a few prefix to argument of message, but prefix siginals where are you from. Changing sigil by "caller" has most/only things to this module exists.

*Note: this can [not] add a suffix of filename and line in the file when called from [no] sub. This depends on 'caller' function.

METHODS

say

Likes say message with sigil prefix.

sayf

Likes say, but first argument will be format of the sprintf.

wran

Likes say, but file handle is specified STDERR.

warnf

Likes warn, but first argument will be format of the sprintf.

dump

Likes warn, but args are changed by Data::Dumper::Dumper.

PROPERTIES

sigils

Is a array-ref which sorted by using order sigil.

repeats

Specifies how many sigil is repeated.

delimiter

Will be placed between sigil and log message.

bias

Controls changing of sigil. bias for the depth of caller.

quiet

Tells Log::Sigil to no output required.

Please remove Log::Sigil from code in production. Set true this when you felt Log::Sigil is riot.

AUTHOR

kuniyoshi kouji <kuniyoshi@cpan.org>

SEE ALSO

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.