| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Template::Caribou::Utils; | 
| 2 |  |  |  |  |  |  | BEGIN { | 
| 3 | 7 |  |  | 7 |  | 1819298 | $Template::Caribou::Utils::AUTHORITY = 'cpan:YANICK'; | 
| 4 |  |  |  |  |  |  | } | 
| 5 |  |  |  |  |  |  | $Template::Caribou::Utils::VERSION = '0.2.4'; | 
| 6 | 7 |  |  | 7 |  | 67 | use strict; | 
|  | 7 |  |  |  |  | 17 |  | 
|  | 7 |  |  |  |  | 251 |  | 
| 7 | 7 |  |  | 7 |  | 71 | use warnings; | 
|  | 7 |  |  |  |  | 27 |  | 
|  | 7 |  |  |  |  | 246 |  | 
| 8 | 7 |  |  | 7 |  | 33 | no warnings qw/ uninitialized /; | 
|  | 7 |  |  |  |  | 12 |  | 
|  | 7 |  |  |  |  | 263 |  | 
| 9 |  |  |  |  |  |  |  | 
| 10 | 7 |  |  | 7 |  | 36 | use Carp; | 
|  | 7 |  |  |  |  | 20 |  | 
|  | 7 |  |  |  |  | 518 |  | 
| 11 |  |  |  |  |  |  |  | 
| 12 | 7 |  |  | 7 |  | 881 | use Moose; | 
|  | 7 |  |  |  |  | 506497 |  | 
|  | 7 |  |  |  |  | 62 |  | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | BEGIN { | 
| 15 | 7 |  |  | 7 |  | 48541 | *::RAW = *::STDOUT; | 
| 16 |  |  |  |  |  |  | } | 
| 17 |  |  |  |  |  |  |  | 
| 18 |  |  |  |  |  |  |  | 
| 19 |  |  |  |  |  |  | __PACKAGE__->meta->make_immutable; | 
| 20 |  |  |  |  |  |  |  | 
| 21 |  |  |  |  |  |  | package | 
| 22 |  |  |  |  |  |  | Template::Caribou::String; | 
| 23 |  |  |  |  |  |  |  | 
| 24 |  |  |  |  |  |  | use overload | 
| 25 | 7 |  |  | 7 |  | 64 | '""' => sub { return ${$_[0] } }; | 
|  | 7 |  |  | 0 |  | 15 |  | 
|  | 7 |  |  |  |  | 94 |  | 
|  | 0 |  |  |  |  | 0 |  | 
|  | 0 |  |  |  |  | 0 |  | 
| 26 |  |  |  |  |  |  |  | 
| 27 | 0 |  |  | 0 |  |  | sub new { my ( $class, $string ) = @_;  bless \$string, $class; } | 
|  | 0 |  |  |  |  |  |  | 
| 28 |  |  |  |  |  |  |  | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | package | 
| 31 |  |  |  |  |  |  | Template::Caribou::Output; | 
| 32 |  |  |  |  |  |  |  | 
| 33 | 7 |  |  | 7 |  | 739 | use parent 'Tie::Handle'; | 
|  | 7 |  |  |  |  | 15 |  | 
|  | 7 |  |  |  |  | 59 |  | 
| 34 |  |  |  |  |  |  |  | 
| 35 | 0 |  |  | 0 |  |  | sub TIEHANDLE { return bless \my $i, shift; } | 
| 36 |  |  |  |  |  |  |  | 
| 37 |  |  |  |  |  |  | sub escape { | 
| 38 | 7 |  |  | 7 |  | 23324 | no warnings qw/ uninitialized/; | 
|  | 7 |  |  |  |  | 18 |  | 
|  | 7 |  |  |  |  | 1286 |  | 
| 39 | 0 |  |  |  |  |  | @_ = map { | 
| 40 | 0 |  |  | 0 |  |  | my $x = $_; | 
| 41 | 0 |  |  |  |  |  | $x =~ s/&/&/g; | 
| 42 | 0 |  |  |  |  |  | $x =~ s/</</g; | 
| 43 | 0 |  |  |  |  |  | $x; | 
| 44 |  |  |  |  |  |  | } @_; | 
| 45 |  |  |  |  |  |  |  | 
| 46 | 0 | 0 |  |  |  |  | return wantarray ? @_ : join '', @_; | 
| 47 |  |  |  |  |  |  | } | 
| 48 |  |  |  |  |  |  |  | 
| 49 | 0 |  |  | 0 |  |  | sub PRINT { shift; print ::RAW escape( @_ ) } | 
|  | 0 |  |  |  |  |  |  | 
| 50 |  |  |  |  |  |  |  | 
| 51 |  |  |  |  |  |  | package | 
| 52 |  |  |  |  |  |  | Template::Caribou::OutputRaw; | 
| 53 |  |  |  |  |  |  |  | 
| 54 | 7 |  |  | 7 |  | 36 | use parent 'Tie::Handle'; | 
|  | 7 |  |  |  |  | 41 |  | 
|  | 7 |  |  |  |  | 40 |  | 
| 55 |  |  |  |  |  |  |  | 
| 56 | 0 |  |  | 0 |  |  | sub TIEHANDLE { return bless \my $i, shift; } | 
| 57 |  |  |  |  |  |  |  | 
| 58 |  |  |  |  |  |  | sub PRINT { | 
| 59 | 0 |  |  | 0 |  |  | shift; | 
| 60 | 7 |  |  | 7 |  | 601 | no warnings qw/ uninitialized /; | 
|  | 7 |  |  |  |  | 14 |  | 
|  | 7 |  |  |  |  | 541 |  | 
| 61 | 0 |  |  |  |  |  | $Template::Caribou::OUTPUT .= join '', @_, $\; | 
| 62 |  |  |  |  |  |  | } | 
| 63 |  |  |  |  |  |  |  | 
| 64 |  |  |  |  |  |  | 1; | 
| 65 |  |  |  |  |  |  |  | 
| 66 |  |  |  |  |  |  | __END__ | 
| 67 |  |  |  |  |  |  |  | 
| 68 |  |  |  |  |  |  | =pod | 
| 69 |  |  |  |  |  |  |  | 
| 70 |  |  |  |  |  |  | =encoding UTF-8 | 
| 71 |  |  |  |  |  |  |  | 
| 72 |  |  |  |  |  |  | =head1 NAME | 
| 73 |  |  |  |  |  |  |  | 
| 74 |  |  |  |  |  |  | Template::Caribou::Utils | 
| 75 |  |  |  |  |  |  |  | 
| 76 |  |  |  |  |  |  | =head1 VERSION | 
| 77 |  |  |  |  |  |  |  | 
| 78 |  |  |  |  |  |  | version 0.2.4 | 
| 79 |  |  |  |  |  |  |  | 
| 80 |  |  |  |  |  |  | =head1 AUTHOR | 
| 81 |  |  |  |  |  |  |  | 
| 82 |  |  |  |  |  |  | Yanick Champoux <yanick@cpan.org> | 
| 83 |  |  |  |  |  |  |  | 
| 84 |  |  |  |  |  |  | =head1 COPYRIGHT AND LICENSE | 
| 85 |  |  |  |  |  |  |  | 
| 86 |  |  |  |  |  |  | This software is copyright (c) 2014 by Yanick Champoux. | 
| 87 |  |  |  |  |  |  |  | 
| 88 |  |  |  |  |  |  | This is free software; you can redistribute it and/or modify it under | 
| 89 |  |  |  |  |  |  | the same terms as the Perl 5 programming language system itself. | 
| 90 |  |  |  |  |  |  |  | 
| 91 |  |  |  |  |  |  | =cut |