sub by_id { my $pkg = (caller())[0]; ${"${pkg}::a"}->id <=> ${"${pkg}::b"}->id; }