/[webpac2]/trunk/lib/WebPAC/Test.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/lib/WebPAC/Test.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 949 - (show annotations)
Thu Nov 1 00:16:48 2007 UTC (16 years, 6 months ago) by dpavlin
File size: 558 byte(s)
 r1433@llin:  dpavlin | 2007-10-31 22:48:02 +0100
 HUGE swiping changes to implement new testing architecture
 based on all new WebPAC::Test module which makes
 test writing a joy

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;

  ViewVC Help
Powered by ViewVC 1.1.26