perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David E. Wheeler" <da...@kineticode.com>
Subject Apache::FakeRequest::import Conflict
Date Wed, 23 Jan 2008 19:03:58 GMT
Under Perl 5.10, Apache::FakeRequest offers up this helpful warning:

trigger% perl -lwe 'use Apache::FakeRequest'
Name "Apache::FakeRequest" used only once: possible typo at /usr/local/ 
lib/perl5/site_perl/5.10.0/darwin-2level/Apache/FakeRequest.pm line 51.

It seems that import() is getting called and it is defined as an  
instance method. This patch fixes the issue:

--- lib/Apache/FakeRequest.pm	2007-11-11 21:35:46.000000000 -0800
+++ lib/Apache/FakeRequest.pm	2008-01-23 10:59:17.000000000 -0800
1:03:32.000000000 -0800
@@ -23,7 +23,7 @@
    filename get_basic_auth_pw get_remote_host
    get_remote_logname handler hard_timeout
    header_in header_only header_out
-  headers_in headers_out hostname import
+  headers_in headers_out hostname
    internal_redirect_handler is_initial_req is_main
    kill_timeout log_error log_reason
    lookup_file lookup_uri main
@@ -68,6 +68,7 @@
      parse_args(wantarray, $r->{args});
  }

+sub import { shift->elem('import', @_) if ref $_[0] }

  {
      my @code;

Best,

David

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message