projects
/
scpubgit/HTML-String.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
TT's new takes a hashref or a hash
[scpubgit/HTML-String.git]
/
lib
/
HTML
/
String
/
Value.pm
diff --git
a/lib/HTML/String/Value.pm
b/lib/HTML/String/Value.pm
index
d03b287
..
d622694
100644
(file)
--- a/
lib/HTML/String/Value.pm
+++ b/
lib/HTML/String/Value.pm
@@
-23,6
+23,7
@@
use overload
'""' => 'escaped_string',
'.' => 'dot',
'.=' => 'dot_equals',
+ '=' => 'clone',
'cmp' => op_factory('cmp'),
'eq' => op_factory('eq'),
@@
-109,4
+110,10
@@
sub dot_equals {
return $self;
}
+sub clone {
+ my $self = shift;
+
+ return ref($self)->new(@{$self->{parts}});
+}
+
1;