Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use strict;
- use warnings;
- use lib qw( ./lib ../lib ../../lib );
- use Template::TT2::Test
- tests => 5,
- debug => 'Template::TT2::Filters',
- args => \@ARGV;
- use Badger::Filesystem '$Bin Dir';
- my $tmp = Dir($Bin, 'tmp')->must_exist(1);
- use Template::TT2::Filters;
- pass('loaded filters');
- #------------------------------------------------------------------------
- # hack to allow STDERR to be tied to a variable.
- # (I'm really surprised there isn't a standard module which does this)
- # UPDATE: there is now... but hey, I've already written the code.
- #------------------------------------------------------------------------
- package Tie::File2Str;
- sub TIEHANDLE {
- my ($class, $textref) = @_;
- bless $textref, $class;
- }
- sub PRINT {
- my $self = shift;
- $$self .= join('', @_);
- }
Add Comment
Please, Sign In to add comment