On Tue, 26 Oct 2004, Carl Brewer wrote:

> Philippe M. Chiasson wrote:
> > Carl Brewer wrote:
> >
>
> > I believe there is a CPAN module that makes it a bit cleaner and
> > less hack-ish:
> >
> > MasonX::Apache2Handler
> > http://search.cpan.org/dist/MasonX-Apache2Handler
>
> Thanks Philippe, I've found that now and built a NetBSD pkg for it.
>
> But, I'm having trouble using it.  I really want to stay clear of
> mp1, but am having trouble getting this handler to work.
>
> I keep seeing this :
>
> [Tue Oct 26 13:28:53 2004] [error] [client 211.26.251.34] Can't locate
> object method "server_root_relative" via package "Apache::ServerRec" at
> /usr/pkg/lib/perl5/site_perl/5.8.4/MasonX/Apache2Handler.pm line 618.\n

>From the mp2 Changes file, ($r|$c|$s)->server_root_relative
has been removed. There is a suggested alternative, which
for MasonX::Apache2Handler translates to (untested):
===============================================================
--- Apache2Handler.pm~  Sun Apr 11 17:02:16 2004
+++ Apache2Handler.pm   Mon Oct 25 22:47:12 2004
@@ -615,7 +615,7 @@
     if (exists $allowed_params->{data_dir} and not exists $params{data_dir})
     {
        # constructs path to <server root>/mason
-       my $def = $defaults{data_dir} = Apache->server->server_root_relative('mason');
+        my $def = $defaults{data_dir} = 
File::Spec->catfile(Apache::ServerUtil::server_root, 'mason');
        param_error "Default data_dir (MasonDataDir) '$def' must be an absolute path"
            unless File::Spec->file_name_is_absolute($def);

=========================================================================

-- 
best regards,
randy kobes

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to