in reply to Re: Parse multipart/form-data with MIME::Parser
in thread Parse multipart/form-data with MIME::Parser

Is there some kind of memoization magic in there or will that only return the form once, since it reads <DATA> but does not save the array anywhere?

Replies are listed 'Best First'.
Re^3: Parse multipart/form-data with MIME::Parser
by choroba (Archbishop) on Apr 25, 2021 at 22:38 UTC
    You are right, it doesn't work when you try to reload a page. Sorry.

    Here's a fix:

    my @template = <DATA>; sub { my $req = 'Plack::Request'->new(shift); my %method = ( GET => sub { \@template }, ...

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]