projects
/
webpac2
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fetch MARC records directly from Koha database
[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
25
our $debug = 0;
26
27
GetOptions(
28
"debug+", \$debug
29
);
30
31
warn '# BEGIN' if $debug;
32
33
our $abs_path = abs_path($0);
34
$abs_path =~ s#/[^/]*$#/#; #vim
35
warn "# abs_path: $abs_path" if $debug;
36
37
our %LOG = (
38
debug => $debug,
39
no_log => $debug ? 0 : 1,
40
);
41
}
42
43
1;