1String::Flogger(3) User Contributed Perl Documentation String::Flogger(3)
2
3
4
6 String::Flogger - string munging for loggers
7
9 version 1.101240
10
12 use String::Flogger qw(flog);
13
14 my @inputs = (
15 'simple!',
16
17 [ 'slightly %s complex', 'more' ],
18
19 [ 'and inline some data: %s', { look => 'data!' } ],
20
21 [ 'and we can defer evaluation of %s if we want', sub { 'stuff' } ],
22
23 sub { 'while avoiding sprintfiness, if needed' },
24 );
25
26 say flog($_) for @inputs;
27
28 The above will output:
29
30 simple!
31
32 slightly more complex
33
34 and inline some data: {{{ "look": "data!" }}}
35
36 and we can defer evaluation of stuff if we want
37
38 while avoiding sprintfiness, if needed
39
41 Ricardo SIGNES <rjbs@cpan.org>
42
44 This software is copyright (c) 2010 by Ricardo SIGNES <rjbs@cpan.org>.
45
46 This is free software; you can redistribute it and/or modify it under
47 the same terms as the Perl 5 programming language system itself.
48
49
50
51perl v5.12.0 2010-05-04 String::Flogger(3)