[Bast-commits] r5511 - in trunk/Devel-REPL: . lib/Devel/REPL/Plugin
Sartak at dev.catalyst.perl.org
Sartak at dev.catalyst.perl.org
Wed Feb 18 00:58:40 GMT 2009
Author: Sartak
Date: 2009-02-18 00:58:40 +0000 (Wed, 18 Feb 2009)
New Revision: 5511
Modified:
trunk/Devel-REPL/
trunk/Devel-REPL/Changes
trunk/Devel-REPL/lib/Devel/REPL/Plugin/DDS.pm
Log:
r80226 at onn: sartak | 2009-02-17 19:58:22 -0500
If the object we're dumping has stringification overloading, then use it directly
Property changes on: trunk/Devel-REPL
___________________________________________________________________
Name: svk:merge
- 08e7d58d-de06-4458-8c15-335e402ab116:/local/Devel-REPL:79775
6d2a1d83-d666-409f-9dbf-d3bfcf4e9009:/local/bast/broken_internets/Devel-REPL:80567
+ 08e7d58d-de06-4458-8c15-335e402ab116:/local/Devel-REPL:80226
6d2a1d83-d666-409f-9dbf-d3bfcf4e9009:/local/bast/broken_internets/Devel-REPL:80567
Modified: trunk/Devel-REPL/Changes
===================================================================
--- trunk/Devel-REPL/Changes 2009-02-17 23:09:49 UTC (rev 5510)
+++ trunk/Devel-REPL/Changes 2009-02-18 00:58:40 UTC (rev 5511)
@@ -1,3 +1,6 @@
+upcoming
+ - If the object we're dumping has stringification overloading, then use
+ it directly
1.3.4
- resolve rt.cpan#43109 Missing deps for Default Profile Plugins
1.3.3
Modified: trunk/Devel-REPL/lib/Devel/REPL/Plugin/DDS.pm
===================================================================
--- trunk/Devel-REPL/lib/Devel/REPL/Plugin/DDS.pm 2009-02-17 23:09:49 UTC (rev 5510)
+++ trunk/Devel-REPL/lib/Devel/REPL/Plugin/DDS.pm 2009-02-18 00:58:40 UTC (rev 5511)
@@ -9,10 +9,14 @@
my $to_dump = (@_ > 1) ? [@_] : $_[0];
my $out;
if (ref $to_dump) {
- my $dds = Data::Dump::Streamer->new;
- $dds->Freezer(sub { "$_[0]"; });
- $dds->Data($to_dump);
- $out = $dds->Out;
+ if (overload::Method($to_dump, '""') {
+ $out = "$to_dump";
+ } else {
+ my $dds = Data::Dump::Streamer->new;
+ $dds->Freezer(sub { "$_[0]"; });
+ $dds->Data($to_dump);
+ $out = $dds->Out;
+ }
} else {
$out = $to_dump;
}
More information about the Bast-commits
mailing list