In actual code there's a
new() and other methods too. I simplified it before posting here. And I started to Deparse when noticed wrong behaviour. Anyway, looks like
chibiryuu is right and it is 5.6.2 bug. In my 5.8.7 both B::Deparse and actual test-suite show that everything is right.
Now to your remark. I override CORE::GLOBAL::die to FIX exceptions not break. My real die looks like this:
sub die (@) {
unless (ref $_[0]) {
CORE::die My::Error->UnCaught(text => join('', @_));
}
CORE::die $_[0];
}
Now, all plain string
die-s magically start to raise blessed objects (with a stringify op not to break something).