SQL-Format

 view release on metacpan or  search on metacpan

t/lib/Util.pm  view on Meta::CPAN

use strict;
use warnings;
use Exporter 'import';
use IO::Handle;
use SQL::Format ();
use Tie::IxHash;
use Test::More;

our @EXPORT = qw(capture_warn mk_errstr mk_test ordered_hashref);

sub capture_warn(&) {
    my $code = shift;

    open my $fh, '>', \my $content;
    $fh->autoflush(1);
    local *STDERR = $fh;
    $code->();
    close $fh;
    
    return $content;
}



( run in 0.239 second using v1.01-cache-2.11-cpan-49f99fa48dc )