in reply to Re: Delayed Redirect using CGI.pm
in thread Delayed Redirect using CGI.pm

It's -meta{} not meta().

While -meta is the recommended way of handling the majority of meta tags, current versions of CGI.pm (2.752+, possibly earlier) don't advocate it's use for generating HTTP-EQUIVs, instead saying...

To create an HTTP-EQUIV tag, use the -head argument as described below.

... and then under -head (reformatted for clarity) ...

To create an HTTP-EQUIV tag, use something like this:

print start_html( -head => meta( { -http_equiv => 'Content-Type', -content => 'text/html', } ), );

    --k.


Update: Added CGI.pm version number.

Update II: On second glance, the current recommended method (ab)uses a feature in CGI's that turns any unknown CGI methods into (X)HTML...

$ perl -MCGI=foo -le 'print foo({-bar => "baz"})' <FOO BAR="baz">

Replies are listed 'Best First'.
Re: Re: Re: Delayed Redirect using CGI.pm
by belg4mit (Prior) on May 14, 2002 at 02:04 UTC
    And yet meta() gives the error above (UPDATE: oic, it's an optional export (though I cannot find the subroutine). we were not told that symbols were being explicitly imported...). The CGI here (v2.56) states:
    There is no support for the HTTP-EQUIV type of <META> tag. This is because you can modify the HTTP header directly with the header() method. For example, if you want to send the Refresh: header, do it in the header() method: print $q->header(-Refresh=>'10; URL=http://www.capricorn.co +m');
    No meta() anywhere. Refresh is a possible value of the HTTP-EQUIV meta tag.

    UPDATE: I see that the current version is 2.81, wahoo. Hrmm. Oh well. Seems to me it's be nicer to use the actual HTTP header than the meta tag anyways, given the option. But it looks like TIMTOWTDI

    --
    perl -pew "s/\b;([mnst])/'$1/g"

      Success - thanks belg4mit. Your header redirect works perfectly.