projects
/
webpac2
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
r1650@llin: dpavlin | 2007-11-20 11:07:57 +0100
[webpac2]
/
lib
/
WebPAC
/
Test.pm
1
package WebPAC::Test;
2
use Exporter 'import';
3
@EXPORT = qw/
4
$debug
5
$abs_path
6
%LOG
7
8
dump
9
abs_path
10
read_file write_file
11
12
dies_ok throws_ok
13
/;
14
15
sub BEGIN {
16
17
use Cwd qw/abs_path/;
18
use File::Slurp;
19
use Getopt::Long;
20
use Data::Dump qw/dump/;
21
use Test::Exception;
22
23
use lib 'lib';
24
use blib;
25
26
our $debug = 0;
27
28
GetOptions(
29
"debug+", \$debug
30
);
31
32
warn '# BEGIN' if $debug;
33
34
our $abs_path = abs_path($0);
35
$abs_path =~ s#/[^/]*$#/#; #vim
36
warn "# abs_path: $abs_path" if $debug;
37
38
our %LOG = (
39
debug => $debug,
40
no_log => $debug ? 0 : 1,
41
);
42
}
43
44
1;