Your $request is not what you think (or hope) it to be. Here is a trivial demo:
#!/usr/bin/env perl use strict; use warnings; use HTTP::Request; use Data::Dumper; my $request = HTTP::Request->new; print "Object:\n", Dumper $request; print "Hash:\n", Dumper %$request;
This will produce (versions depending) something like:
Object: $VAR1 = bless( { '_uri' => undef, '_content' => '', '_headers' => bless( {}, 'HTTP::Headers' ), '_method' => undef }, 'HTTP::Request' ); Hash: $VAR1 = '_uri'; $VAR2 = undef; $VAR3 = '_content'; $VAR4 = ''; $VAR5 = '_headers'; $VAR6 = bless( {}, 'HTTP::Headers' ); $VAR7 = '_method'; $VAR8 = undef;
It is therefore highly probable as everyone else has surmised that you have accidentally stringified $request at some point in the code you have not shown. The Basic Debugging Checklist may help you to pinpoint where that happens.
🦛
In reply to Re: Data::Dumper output
by hippo
in thread Data::Dumper output
by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |