# New Ticket Created by  geo...@corp.sonic.net 
# Please include the string:  [perl #101474]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=101474 >


Attached please find a patch that makes the orig-string role
in nom's MAIN_HELPER() DWIM a better.


-'f

>From 8ee72bed73f6a13606d7ea6b6614d06fd04d12a6 Mon Sep 17 00:00:00 2001
From: Geoffrey Broadwell <ge...@broadwell.org>
Date: Sun, 16 Oct 2011 16:11:37 -0700
Subject: [PATCH] DWIM better in orig-string role in MAIN_HELPER()

In the first snapshot orig-string was too aggressive, and in the
second snapshot it was too conservative.  This middle ground seems
to DWIM better than either extreme did.
---
 src/core/Main.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/core/Main.pm b/src/core/Main.pm
index 09cdbad..a6330e1 100644
--- a/src/core/Main.pm
+++ b/src/core/Main.pm
@@ -73,7 +73,7 @@ my sub MAIN_HELPER($retval = 0) {
 
         # Mix in original stringifications
         my role orig-string[$orig] {
-            multi method Str  (Mu:D:) { $orig.Str  }
+                  method Str  ()      { $orig.Str  }
             multi method gist (Mu:D:) { $orig.gist }
         };
         return $val but orig-string[$v];
-- 
1.7.4.1

Reply via email to