Apache::Wyrd::Version - Designate a block for certain classes of browsers
<BASENAME::BrowserSwitch> <BASENAME::Version test="IE"> .. version for MSIE .. </BASENAME::VERSION> <BASENAME::Version tests="Gecko, Safari"> .. version for NS & Safari .. </BASENAME::VERSION> <BASENAME::Version test="Lynx"> .. version for Lynx .. </BASENAME::VERSION> <BASENAME::Version test="Google" matchstring="Googlebot"> .. version for Google .. </BASENAME::VERSION> </BASENAME::BrowserSwitch>
A sub-wyrd of BrowserSwitch which delineates a version of a section of HTML which must be rendered differently for different browsers.
The browser type the enclosed HTML is targeted to. Builtin tests are ie, gecko, safari, and lynx. Case is not sensitive.
An alias for test.
If you are targeting one of the other browsers, this attribute provides a substring which will be checked against the User-Agent string of the browser.
(format: (returns) name (arguments after self))
match
Does the work of matching the browser type to the given version. Returns a 1 if the browser is targeted by this version.
_test
Internal method for comparing user-agent strings to test values. Provides the builtin tests.
Reserves the _setup and _generate_output methods.
Barry King <wyrd@nospam.wyrdwright.com>
General-purpose HTML-embeddable perl object
Enclose a set of browser-versioned blocks
Copyright 2002-2007 Wyrdwright, Inc. and licensed under the GNU GPL.
See LICENSE under the documentation for Apache::Wyrd.
Apache::Wyrd
To install Apache::Wyrd, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache::Wyrd
CPAN shell
perl -MCPAN -e shell install Apache::Wyrd
For more information on module installation, please visit the detailed CPAN module installation guide.