perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/t/response/TestModperl methodname.pm
Date Fri, 24 May 2002 02:33:06 GMT
dougm       02/05/23 19:33:06

  Modified:    src/modules/perl modperl_mgv.c
               t/response/TestModperl methodname.pm
  Log:
  if Class->method syntax is used for a Perl*Handler, the :method
  attribute is not required (and we had been segfaulting without it)
  
  Revision  Changes    Path
  1.17      +4 -3      modperl-2.0/src/modules/perl/modperl_mgv.c
  
  Index: modperl_mgv.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_mgv.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- modperl_mgv.c	18 May 2002 01:49:37 -0000	1.16
  +++ modperl_mgv.c	24 May 2002 02:33:06 -0000	1.17
  @@ -303,9 +303,10 @@
       if ((gv = gv_fetchmethod(stash, handler_name)) && (cv = GvCV(gv))) {
           if (CvFLAGS(cv) & CVf_METHOD) { /* sub foo : method {}; */
               MpHandlerMETHOD_On(handler);
  -            if (!handler->mgv_obj) {
  -                modperl_mgv_new_name(handler->mgv_obj, p, HvNAME(stash));
  -            }
  +        }
  +
  +        if (MpHandlerMETHOD(handler) && !handler->mgv_obj) {
  +            modperl_mgv_new_name(handler->mgv_obj, p, HvNAME(stash));
           }
   
           handler->attrs = (U32)MP_CODE_ATTRS(cv);
  
  
  
  1.2       +2 -1      modperl-2.0/t/response/TestModperl/methodname.pm
  
  Index: methodname.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/methodname.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- methodname.pm	18 May 2002 02:07:42 -0000	1.1
  +++ methodname.pm	24 May 2002 02:33:06 -0000	1.2
  @@ -10,7 +10,8 @@
   
   use TestModperl::method ();
   
  -sub response : method {
  +#no : method attribute required when -> config syntax is used
  +sub response {
       TestModperl::method::handler(@_);
   }
   
  
  
  

Mime
View raw message