Plugin name
Neil Bowers <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Message-ID | <[email protected]> |
Do people post plugin thoughts here for feedback, before committing a name to CPAN? I've created a simple Template plugin for accessing HTTP User-Agent details. At the moment it's built on HTML::ParseBrowser, but with a simpler more generic interface, so it can be backed onto another module, if a better one becomes available. I'm thinking of Template::Plugin::HTTP::UserAgent. You'd use it as follows: [% USE ua = HTTP::UserAgent %] [% IF ua.name == 'Internet Explorer' && ua.major <= 7 %] ... [% ELSE %] ... [% END %] You can pass it a user-agent string, but if one isn't passed, it will look for the relevant environment variable. Other possible names: Parse::HTTP::UserAgent Parse::UserAgent UserAgent Any thoughts & suggestions appreciated, Neil