in reply to Sort on two properties

Use cmp for comparing strings and <=> for comparing numbers (see perlop). What you want is something like this:

@{$self->{queue}} = sort{ $a->id <=> $b->id || $a->name cmp $b->name } @{$self->{queue}};