Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Passing extra vars from build.cgi to build.pm

Quote Reply
Passing extra vars from build.cgi to build.pm
Have the following problem:

in nph_build.cgi we call:
print DETAIL Links::Build::build ('detailed', $link);

in build.pm we take:
my $link = shift;

So i could play with every $link->{Fieldname} here.

I tried in build.cgi to pass with:
$link->{extra} = '1';
print DETAIL Links::Build::build ('detailed', $link);
but it fails, i can print out $link->{extra} , but it seems it isnīt inside the $link we pass to build.pm

another idea was to pass it like that:
print DETAIL Links::Build::build ('detailed', {$link, extra => '1'});
but then the build.pm takes the wrong arguments with the shift.

I also have tried to refill a field from the Links table, but this failed too.
$link->{Description} = '1';
print DETAIL Links::Build::build ('detailed', $link);

Remember the same problems in 1.x, but there i was solveable for me.

Now i have only one solution to copy the build_detailed in build.pm so often i need that extra var. But it thatīs not very clean ;-(

Has someone a clue, how to do that?
Robert
Subject Author Views Date
Thread Passing extra vars from build.cgi to build.pm Robert 1295 Feb 1, 2003, 11:31 AM
Thread Re: [Robert] Passing extra vars from build.cgi to build.pm
pugdog 1221 Feb 1, 2003, 11:06 PM
Post Re: [pugdog] Passing extra vars from build.cgi to build.pm
Robert 1222 Feb 2, 2003, 1:22 PM