in reply to OO and sorting

dragonchild is right, you can do $main::a and $main::b, but that is not very portable...

Update I didn't mean portable, I meant re-usable...

here is code that works....

sub by_id { my $pkg = (caller())[0]; ${"${pkg}::a"}->id <=> ${"${pkg}::b"}->id; }
dunno how good a way to do it that is... but it should work...

                - Ant