Update I didn't mean portable, I meant re-usable...
here is code that works....
dunno how good a way to do it that is... but it should work...sub by_id { my $pkg = (caller())[0]; ${"${pkg}::a"}->id <=> ${"${pkg}::b"}->id; }
- Ant
In reply to Re: OO and sorting
by suaveant
in thread OO and sorting
by artist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |