Fixed dyld issues with libapre2 on darwin
This commit is contained in:
parent
bf960218bf
commit
392f79ce8c
1 changed files with 19 additions and 0 deletions
|
|
@ -48,6 +48,25 @@ BEGIN {
|
||||||
|
|
||||||
lib->import( $WEBGUI_LIB );
|
lib->import( $WEBGUI_LIB );
|
||||||
|
|
||||||
|
# http://thread.gmane.org/gmane.comp.apache.apreq/3378
|
||||||
|
# http://article.gmane.org/gmane.comp.apache.apreq/3388
|
||||||
|
unless ( $^O ne 'darwin' ) {
|
||||||
|
|
||||||
|
require Class::Null;
|
||||||
|
require IO::File;
|
||||||
|
|
||||||
|
unshift @INC, sub {
|
||||||
|
return undef unless $_[1] =~ m/^Apache2|APR/;
|
||||||
|
return IO::File->new( $INC{'Class/Null.pm'}, &IO::File::O_RDONLY );
|
||||||
|
};
|
||||||
|
|
||||||
|
no strict 'refs';
|
||||||
|
|
||||||
|
*Apache2::Const::OK = sub { 0 };
|
||||||
|
*Apache2::Const::DECLINED = sub { -1 };
|
||||||
|
*Apache2::Const::NOT_FOUND = sub { 404 };
|
||||||
|
}
|
||||||
|
|
||||||
unless ( eval "require WebGUI::Session;" ) {
|
unless ( eval "require WebGUI::Session;" ) {
|
||||||
warn qq/Failed to require package 'WebGUI::Session'. Reason: '$@'.\n/;
|
warn qq/Failed to require package 'WebGUI::Session'. Reason: '$@'.\n/;
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue