[Chicago-talk] WWW::Mechanize can't recognize a html file with no file extention.

Andy Lester andy at petdance.com
Mon Mar 6 21:44:12 PST 2006


> my $m = WWW::Mechanize->new();
> $m->get(URI::file->new('/home/pub/html/test/151683_10'));
> $m->{ct} = 'text/html'; # <-- the evil part
> print $m->content(format => 'text');

It's evil, and it also will break if the internal representation of  
{ct} ever changes.

> It would be nice if the ct method could take an argument that lets you
> set the content type.  Or even better if you could change the  
> default to
> whatever you want.

That might just happen.


--
Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance





More information about the Chicago-talk mailing list