perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fred Moyer <>
Subject Fwd: [ #64999] GvCV and GvGP lvalue changes in perl core
Date Fri, 21 Jan 2011 16:38:48 GMT
---------- Forwarded message ----------
From: Dave Mitchell via RT <>
Date: Fri, Jan 21, 2011 at 8:37 AM
Subject: [ #64999] GvCV and GvGP lvalue changes in perl core

Fri Jan 21 11:37:33 2011: Request 64999 was acted upon.
Transaction: Ticket created by
      Queue: mod_perl
    Subject: GvCV and GvGP lvalue changes in perl core
  Broken in: (no value)
   Severity: (no value)
      Owner: Nobody
     Status: new
 Ticket <URL: >

Hi, A search of sources on CPAN shows that your module(s) use GvCV()
and/or GvGP() in an lvalue context (i.e. you assign to it).
>From perl 5.13.10 onwards, this will no longer be allowed, and you'll
need to update your source code in such a way as to be compatible with
both existing and the new perls.

Probably the easiest way to do this is to add the following

   #ifndef GvCV_set
   #  define GvCV_set(gv,cv)   (GvGP(gv)->gp_cv = (cv))
   #ifndef GvGP_set
   #  define GvGP_set(gv,gp)   ((gv)->sv_u.svu_gp = (gp))

then replace code like the following:

   GvGP(gv) = gp;
   GvCV(gv) = cv;


   GvGP_set(gv, gp);
   GvCV_set(gv, cv);

If you do something like


then you may need to replace it with a custom SAVEDESTRUCTOR() or similar
that does a GvCV_set(gv,old_value) upon restoration.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message