Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* Added a new "scratchd" test type. This is the same as "scratch"

      except that it deletes the variable from the scratchpad after
      testing.
  • Loading branch information...
commit 5b01133b823e1f6de1262d71770708ac8af74e1b 1 parent fcc1a0a
Kevin Walsh authored
Showing with 12 additions and 2 deletions.
  1. +3 −0  WHATSNEW-5.5
  2. +9 −2 lib/Vend/Interpolate.pm
View
3  WHATSNEW-5.5
@@ -132,6 +132,9 @@ Core
* Removed MV_DOLLAR_ZERO workaround for a bug fixed 5 years ago.
+* Added a new "scratchd" test type. This is the same as "scratch" except
+ that it deletes the variable from the scratchpad after testing.
+
UserDB
------
View
11 lib/Vend/Interpolate.pm
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.283 2007-08-10 08:41:22 thunder Exp $
+# $Id: Interpolate.pm,v 2.284 2007-08-20 23:57:34 kwalsh Exp $
#
# Copyright (C) 2002-2007 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -28,7 +28,7 @@ package Vend::Interpolate;
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.283 $, 10);
+$VERSION = substr(q$Revision: 2.284 $, 10);
@EXPORT = qw (
@@ -977,6 +977,13 @@ sub conditional {
$op .= qq% $operator $comp%
if defined $comp;
}
+ elsif($base eq 'scratchd') {
+ $op = qq%$::Scratch->{$term}%;
+ $op = "q{$op}" unless defined $noop;
+ $op .= qq% $operator $comp%
+ if defined $comp;
+ delete $::Scratch->{$term};
+ }
elsif($base =~ /^value/) {
$op = qq%$::Values->{$term}%;
$op = "q{$op}" unless defined $noop;
Please sign in to comment.
Something went wrong with that request. Please try again.