Mark Hedges wrote:
> I tried this in production and it works, but I get this warning 
> for every hit:
> 
>     Version string '2.06-dev' contains invalid data; ignoring: '-dev' at 
>     /usr/lib/perl5/site_perl/5.8.5/HTML/Mason/ApacheHandler.pm line 689.
> 

That's an warning thrown by version.pm, not Mason.  $VERSION is defined 
as a number *everywhere*; I don't know why people think that they can 
stuff random crap in there and have anything work.  The quickest way to 
fix that is to localize the warnings (not tested and watch for linewraps):

--- ApacheHandler.pm.orig       2006-06-15 17:16:01.888860576 -0400
+++ ApacheHandler.pm    2006-06-15 17:16:42.915507256 -0400
@@ -686,6 +686,7 @@

      my $apreq_module = APACHE2 ? 'Apache2::Request' : 'Apache::Request';
      if ($self->args_method eq 'mod_perl') {
+       local $^W;
          unless (defined $apreq_module->VERSION) {
              warn "Loading $apreq_module at runtime.  You could " .
                   "increase shared memory between Apache processes by ".

which will prevent that from leaking into your logfiles.  I'll have to 
think about how I can prevent that warning from being annoying, while 
still doing the right thing...

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748


_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to