Log-Report-Optional

 view release on metacpan or  search on metacpan

lib/Log/Report/Minimal.pm  view on Meta::CPAN

    {   warn "$show\n";   # call the warn handler
    }

    1;
}


sub dispatcher($@) { panic "no dispatchers available in ".__PACKAGE__ }


sub try(&@)
{   my $code = shift;

    @_ % 2 and report {}, PANIC =>
        __x"odd length parameter list for try(): forgot the terminating ';'?";

#XXX MO: only needs the fatal subset, exclude the warns/prints

    eval { $code->() };
}



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