Skip Menu |

This queue is for tickets about the CSS-Tiny CPAN distribution.

Report information
The Basics
Id: 15194
Status: resolved
Worked: 45 min
Priority: 0/
Queue: CSS-Tiny

People
Owner: Nobody in particular
Requestors: cpan [...] impweb.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.10
Fixed in: (no value)



Subject: Problem with clone method when Clone module is not available
The inline clone implementation is flawed in that it calls $self->new, which will result in `bless {}, shift`. This is a problem because calling bless with the CSS::Tiny object as the classname is an error (reference, vs name). Instead, one of the following should be done: 1) In clone: my $copy = new(ref $self) 2) In clone: my $copy = (ref $self)->new 3) In clone: my $copy = bless {},ref($self); 4) sub new { my $class = shift; $class = ref($class) if ref($class); bless {}, $class }