Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^6: Catalyst::Request::Upload inside-out-object weirdness

by andye (Curate)
on Mar 26, 2010 at 15:43 UTC ( #831182=note: print w/replies, xml ) Need Help??

in reply to Re^5: Catalyst::Request::Upload inside-out-object weirdness
in thread Catalyst::Request::Upload inside-out-object weirdness

you're right. amending catalyst::engine to say

my $u = Catalyst::Request::Upload->new ( size => $upload->{size}, type => $headers->content_type, headers => $headers, tempname => $upload->{tempname}, filename => $upload->{filename}, ); use Data::Dump +er; die '$headers: +'.Dumper($headers). 'type:'.Du +mper($headers->content_type). '$u:'.Dump +er($u). "\nek!";


[error] Caught exception in engine "$headers:$VAR1 = bless( { 'content-disposition' => 'form-data; name="SourceFile +_1"; filename="aaa.jpg"', 'content-type' => 'image/jpeg; charset=utf-8; Content +-Transfer-Encoding: binary' }, 'HTTP::Headers' ); type:$VAR1 = 'image/jpeg'; $VAR2 = 'charset=utf-8; Content-Transfer-Encoding: binary'; $u:$VAR1 = bless( { 'aaa.jpg' => undef, '/tmp/P3v6fH2JR6' => 'filename', 'HTTP::Headers=HASH(0x40e9e58)' => 'tempname', 'type' => 'image/jpeg', 'charset=utf-8; Content-Transfer-Encoding: binary' => + 'headers', 'size' => 374205 }, 'Catalyst::Request::Upload' ); ek! at /Library/Perl/5.8.6/Catalyst/ line 556."
so it looks like $headers->content_type is indeed returning two values. I'll suggest a patch.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://831182]
[marto]: "no it's not that"...."weirdos "...
[marto]: List EXE_FILES installed by CPAN so a couple of people suggest that your code looks obfuscated. I'd have to ageree, from the perspective of those who can't follow all of that one liner, it doesn't read well
Veltro is a weirdo, obsessed with whitespace
[marto]: to use the word "obsession" when so few people have said so little about it is grasping at staws
marto wishes tye was around, he's so much better at this sort of thing
usemodperl likes tye!
usemodperl tye  too
[choroba]: Re^3: LiBXML: New markup while preserving earlier tags? would benefit from a couple of test cases
usemodperl meant tye 
usemodperl pokes Veltro with line noise

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2018-06-24 16:01 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.