in reply to Data::Dumper output
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.
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Data::Dumper output
by Bod (Parson) on May 08, 2021 at 11:06 UTC | |
by parv (Parson) on May 08, 2021 at 11:28 UTC | |
by Bod (Parson) on May 08, 2021 at 12:27 UTC | |
by afoken (Chancellor) on May 08, 2021 at 16:00 UTC | |
by hippo (Archbishop) on May 08, 2021 at 22:45 UTC | |
|