Log::Sigil - show warnings with sigil prefix
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" );
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.
Likes say message with sigil prefix.
Likes say, but first argument will be format of the sprintf.
Likes say, but file handle is specified STDERR.
Likes warn, but first argument will be format of the sprintf.
Likes warn, but args are changed by Data::Dumper::Dumper.
Is a array-ref which sorted by using order sigil.
Specifies how many sigil is repeated.
Will be placed between sigil and log message.
Controls changing of sigil. bias for the depth of caller.
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.
kuniyoshi kouji <kuniyoshi@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Log::Sigil, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Sigil
CPAN shell
perl -MCPAN -e shell install Log::Sigil
For more information on module installation, please visit the detailed CPAN module installation guide.