Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

varname is the name of a perl internal function, stop using it

  • Loading branch information...
commit ec8761bb4095be7fbb4eda2c159c6ad653eed1d6 1 parent 0230803
Jesse Luehrs authored November 15, 2011

Showing 1 changed file with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. 10  prototype/mop.xs
10  prototype/mop.xs
@@ -285,13 +285,13 @@ static OP *parse_class(pTHX_ GV *namegv, SV *psobj, U32 *flagsp)
285 285
 
286 286
 static OP *parse_has(pTHX_ GV *namegv, SV *psobj, U32 *flagsp)
287 287
 {
288  
-    SV *varname;
  288
+    SV *name;
289 289
     OP *ret, *pad_op, *metadata = NULL, *attr_default = NULL;
290 290
 
291 291
     *flagsp |= CALLPARSER_STATEMENT;
292 292
 
293 293
     lex_read_space(0);
294  
-    varname = parse_scalar_varname();
  294
+    name = parse_scalar_varname();
295 295
 
296 296
     lex_read_space(0);
297 297
     if (lex_peek_unichar(0) == '(') {
@@ -309,11 +309,11 @@ static OP *parse_has(pTHX_ GV *namegv, SV *psobj, U32 *flagsp)
309 309
     }
310 310
 
311 311
     pad_op = newOP(OP_PADSV, (OPpLVAL_INTRO<<8)|OPf_PARENS|OPf_WANT_LIST);
312  
-    pad_op->op_targ = pad_add_my_scalar_sv(varname);
  312
+    pad_op->op_targ = pad_add_my_scalar_sv(name);
313 313
 
314  
-    SvREFCNT_inc(varname);
  314
+    SvREFCNT_inc(name);
315 315
     ret = newLISTOP(OP_LIST, 0,
316  
-                    newSVOP(OP_CONST, 0, varname),
  316
+                    newSVOP(OP_CONST, 0, name),
317 317
                     newUNOP(OP_REFGEN, 0, pad_op));
318 318
 
319 319
     if (metadata) {

0 notes on commit ec8761b

Please sign in to comment.
Something went wrong with that request. Please try again.