| 1 | ################################################################################ |
1 | ################################################################################ |
| 2 | # WeBWorK Online Homework Delivery System |
2 | # WeBWorK Online Homework Delivery System |
| 3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
| 4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/Utils.pm,v 1.39 2004/03/18 21:08:04 sh002i Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/Utils.pm,v 1.40 2004/04/05 03:58:23 sh002i Exp $ |
| 5 | # |
5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify it under |
6 | # This program is free software; you can redistribute it and/or modify it under |
| 7 | # the terms of either: (a) the GNU General Public License as published by the |
7 | # the terms of either: (a) the GNU General Public License as published by the |
| 8 | # Free Software Foundation; either version 2, or (at your option) any later |
8 | # Free Software Foundation; either version 2, or (at your option) any later |
| 9 | # version, or (b) the "Artistic License" which comes with this package. |
9 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 28 | #use Apache::DB; |
28 | #use Apache::DB; |
| 29 | use Date::Format; |
29 | use Date::Format; |
| 30 | use Date::Parse; |
30 | use Date::Parse; |
| 31 | use Errno; |
31 | use Errno; |
| 32 | use File::Path qw(rmtree); |
32 | use File::Path qw(rmtree); |
|
|
33 | use Carp; |
| 33 | |
34 | |
| 34 | use constant MKDIR_ATTEMPTS => 10; |
35 | use constant MKDIR_ATTEMPTS => 10; |
| 35 | |
36 | |
| 36 | our @EXPORT = (); |
37 | our @EXPORT = (); |
| 37 | our @EXPORT_OK = qw( |
38 | our @EXPORT_OK = qw( |
| … | |
… | |
| 57 | cryptPassword |
58 | cryptPassword |
| 58 | dequote |
59 | dequote |
| 59 | undefstr |
60 | undefstr |
| 60 | ); |
61 | ); |
| 61 | |
62 | |
| 62 | sub runtime_use($) { |
63 | sub runtime_use { |
| 63 | return unless @_; |
64 | croak "runtime_use: no module specified" unless $_[0]; |
| 64 | eval "package Main; require $_[0]; import $_[0]"; |
65 | eval "package Main; require $_[0]; import $_[0]"; |
| 65 | die $@ if $@; |
66 | die $@ if $@; |
| 66 | } |
67 | } |
| 67 | |
68 | |
| 68 | #sub backtrace { |
69 | #sub backtrace { |