comparison Lib/IMPL/clone.pm @ 181:47dac58691ee

New templating system, small fixes
author sourcer
date Thu, 26 Jan 2012 01:15:57 +0400
parents 9057e4b95d10
children 4d0e1962161c
comparison
equal deleted inserted replaced
180:d1676be8afcc 181:47dac58691ee
47 sub clone { 47 sub clone {
48 return unless @_; 48 return unless @_;
49 49
50 return $_[0] unless ref $_[0]; 50 return $_[0] unless ref $_[0];
51 51
52 return $_[1]->{refaddr($_[0])} || ($handlers{reftype($_[0])} || sub { die "Unknown reftype " . reftype($_[0])} )->(@_); 52 return $_[1]->{refaddr($_[0])} || (UNIVERSAL::can($_[0],'_clone') || $handlers{reftype($_[0])} || sub { die "Unknown reftype " . reftype($_[0])} )->(@_);
53 } 53 }
54 54
55 } 55 }
56 56
57 1; 57 1;