X-Git-Url: http://git.shiar.net/perl/plp/.git/blobdiff_plain/b7a10718f1c1e5d0028cd367c337e9f85dc56618..0f5e78a789961923b45cae1a881c655fff9e7283:/plpfields.pm diff --git a/plpfields.pm b/plpfields.pm deleted file mode 100644 index 5325d69..0000000 --- a/plpfields.pm +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/perl -# shebang only for color coding, just ignore it m'kay? -use strict; -use vars qw(%get %post %fields %cookie %INTERNAL); - -$INTERNAL{getsub} = sub { - my %get; - if ($ENV{QUERY_STRING} ne ''){ - for (split /&/, $ENV{QUERY_STRING}) { - my @keyval = split /=/; - DecodeURI(@keyval); - $get{$keyval[0]} = $keyval[1]; - } - } - return \%get; -}; - -$INTERNAL{postsub} = sub { - my %post; - $INTERNAL{post} = ; - if (defined($INTERNAL{post}) && $INTERNAL{post} ne '' && - ($ENV{CONTENT_TYPE} eq '' || $ENV{CONTENT_TYPE} eq 'application/x-www-form-urlencoded')){ - for (split /&/, $INTERNAL{post}) { - my @keyval = split /=/; - DecodeURI(@keyval); - $post{$keyval[0]} = $keyval[1]; - } - } - return \%post; -}; - -$INTERNAL{fieldssub} = sub { - $get{PLPdummy}, $post{PLPdummy}; # Trigger creation - return {%get, %post} -}; - -tie %get, 'PLP::Delay', 'main::get', $INTERNAL{getsub}; -tie %post, 'PLP::Delay', 'main::post', $INTERNAL{postsub}; -tie %fields, 'PLP::Delay', 'main::fields', $INTERNAL{fieldssub}; - -#%fields = (%get, %post); - -if (defined($ENV{HTTP_COOKIE}) && $ENV{HTTP_COOKIE} ne ''){ - for (split /; ?/, $ENV{HTTP_COOKIE}) { - my @keyval = split /=/; - $cookie{$keyval[0]} ||= $keyval[1]; - } -} - -1;