Skip Menu |

This queue is for tickets about the MIME-Types CPAN distribution.

Report information
The Basics
Id: 2545
Status: resolved
Worked: 1 min
Priority: 0/
Queue: MIME-Types

People
Owner: MARKOV [...] cpan.org
Requestors: ric [...] likewhoa.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.06
Fixed in: (no value)



Subject: Breaks under forked environments
The __DATA__ section can only be read once. Under a forked environment such as mod_perl this will prevent the module from ever working correctly. The following patch resets the DATA filehandle position after reading the data. --- Types.pm Thu May 1 16:46:07 2003 +++ Types.pm Fri May 9 18:47:27 2003 @@ -20,6 +20,7 @@ { local $_; local $/ = "\n"; + my $pos = tell(MIME::Types::DATA); while(<MIME::Types::DATA>) { s/\#.*//; next if m/^$/; @@ -46,6 +47,7 @@ , system => $os ); } + seek(MIME::Types::DATA,$pos,0); } close DATA;