kareila: "PERL!" (perl)
kareila ([personal profile] kareila) wrote in [site community profile] dw_dev_training 2010-06-15 06:34 am (UTC)

Sorry I misunderstood you the first time.

The variables in this code are really hard to read, but it looks like in the context you're working in, the community isn't available as a user object, so you'll have to load it.

There's a line a few lines below the part you're working on that reads:

my $comm = LJ::load_userid( $id );

If you were to paste that directly above your line, you should be able to access the username of the community as $comm->user, if I am reading this correctly.

Of course, you don't want to have to do the same assignment in every block, so it might make sense to move that line even further up where both blocks can access the same value.

Hope that helps!

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting