| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | # ----------------------------------------------------------------------------- | ||
| 4 | # | ||
| 5 | # Nes by Skriptke | ||
| 6 | # Copyright 2009 - 2010 Enrique F. Castañón Barbero | ||
| 7 | # Licensed under the GNU GPL. | ||
| 8 | # | ||
| 9 | # CPAN: | ||
| 10 | # http://search.cpan.org/dist/Nes/ | ||
| 11 | # | ||
| 12 | # Sample: | ||
| 13 | # http://nes.sourceforge.net/ | ||
| 14 | # | ||
| 15 | # Repository: | ||
| 16 | # http://github.com/Skriptke/nes | ||
| 17 | # | ||
| 18 | # Version 1.03 | ||
| 19 | # | ||
| 20 | # location.pl | ||
| 21 | # | ||
| 22 | # ----------------------------------------------------------------------------- | ||
| 23 | |||
| 24 | use Nes; | ||
| 25 | my $nes = Nes::Singleton->new('./location.nhtml'); | ||
| 26 | my $url = $nes->{'query'}->{'q'}{'location_param_1'}; | ||
| 27 | my $sta = $nes->{'query'}->{'q'}{'location_param_2'} || "302 Found"; | ||
| 28 | |||
| 29 | my %tags; | ||
| 30 | $tags{'status'} = $sta; | ||
| 31 | $nes->out(%tags); | ||
| 32 | |||
| 33 | $nes->{'container'}->{'content_obj'}->location( $url, $sta ); | ||
| 34 | |||
| 35 | 1; |