[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mason-cvs
Subject:    [Mason-checkins] CVS: mason/dist/lib/HTML/Mason ApacheHandler.pm,1.289,1.290
From:       Dave Rolsky <autarch () users ! sourceforge ! net>
Date:       2003-05-17 17:21:48
[Download RAW message or body]

Update of /cvsroot/mason/mason/dist/lib/HTML/Mason
In directory sc8-pr-cvs1:/tmp/cvs-serv6945

Modified Files:
	ApacheHandler.pm 
Log Message:
restore previous comp_root checking code, because we don't want to allow default from \
H::M::Resolver::File to be used.  only change is die => param_error


Index: ApacheHandler.pm
===================================================================
RCS file: /cvsroot/mason/mason/dist/lib/HTML/Mason/ApacheHandler.pm,v
retrieving revision 1.289
retrieving revision 1.290
diff -u -r1.289 -r1.290
--- ApacheHandler.pm	17 May 2003 17:01:57 -0000	1.289
+++ ApacheHandler.pm	17 May 2003 17:21:46 -0000	1.290
@@ -599,14 +599,16 @@
 	}
     }
 
-    my $self = eval { $class->SUPER::new(%defaults, %params) };
-
-    if ( $@ && isa_mason_exception( $@, 'Params' ) && $@->message =~ /comp_root/ )
+    # Don't allow resolver to get created without comp_root, if it needs one
+    if ( exists $allowed_params->{comp_root} &&
+         ! $defaults{comp_root} &&
+         ! $params{comp_root} )
     {
-        error "No comp_root specified and cannot determine DocumentRoot." .
-              " Please provide an explicit comp_root.";
+	param_error "No comp_root specified and cannot determine DocumentRoot." .
+                    " Please provide comp_root explicitly.";
     }
-    rethrow_exception $@;
+
+    my $self = $class->SUPER::new(%defaults, %params);
 
     unless ( $self->interp->resolver->can('apache_request_to_comp_path') )
     {



-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java
code to make your application fit in a relational database is painful, 
don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
Mason-checkins mailing list
Mason-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-checkins


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic