File: 04_nolog.t

package info (click to toggle)
liblog-dispatch-config-perl 1.04-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 220 kB
  • sloc: perl: 233; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 440 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use strict;
use Test::More tests => 1;

use Log::Dispatch::Config;
use FileHandle;
use File::Temp qw(tempfile);
use IO::Scalar;

sub writefile {
    my $fh = FileHandle->new(">" . shift) or die $!;
    $fh->print(@_);
}

my($fh, $file) = tempfile;
writefile($file, <<'CFG');
CFG
    ;

Log::Dispatch::Config->configure($file);

{
    my $disp = Log::Dispatch::Config->instance;
    $disp->debug('null');
}

ok 1, 'can call with nothing';