in reply to get the "last part" of a Path::Class object

sub Path::Class::Entity::last_part { my $p = shift; return $p->is_dir ? $p->dir_list(-1) : $p->basename; }