(nitpick/idiom)
Oh actually, changed my mind, here's a bit more idiomatic, and hopefully intuitive, way of doing that, with a bit more stringent error-checking (note that this shouldn't be necessary, but LJ::load_userid isn't guaranteed to give us a proper $u object, so it's always best to check!

    my $show_name;
    if ( $posterid ) {
        my $u = LJ::load_userid ( $posterid );
        $show_name = $u->display_name if $show_name;
    }

    $show_name ||= $sp->{reqname};


Which basically says: try to get a name from the posterid/user object. If, after all that, we had no show_name still, then use the reqname.