Skip Menu |

This queue is for tickets about the Blessed-Merge CPAN distribution.

Report information
The Basics
Id: 131903
Status: resolved
Priority: 0/
Queue: Blessed-Merge

Owner: Nobody in particular
Requestors: perl [...]

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

Subject: merge classes?
Download (untitled) / with headers
text/plain 645b
use Blessed::Merge; my $blessed = Blessed::Merge->new({ merge_classes => 1 }); my $world = $blessed->merge( Foo->new, Bar->new ); $world->isa('Foo'); # true $world->isa('Bar'); # true This would be pretty easy to implement. 1. Detect if multiple classes are being merged. You already do this. If they're all the same class, then bless $world into that class. 2. If one of those classes is a superclass of all the others, then bless $world into that class. 3. Otherwise, set @Blessed::Merge::__ANON__::000001::ISA = qw(Foo Bar) and bless $world into "Blessed::Merge::__ANON__::000001". (You'll need to keep a counter and increment it.)
On second thoughts, #2 should be "if one of those classes is a *subclass* of all the others".
resolved in v0.11

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to