Comments (3)
On 11/02/2012 05:22, Vick Khera wrote:
When processing a template which uses the autoformat filter, it fails with the complaint that it cannot find the filter.
[...]
plugin error - autoformat: plugin not found
Hi Vick,
I'm guessing you're on a Mac. The problem is that Apple's HFS file system is case insensitive, so Template::Plugins is trying to load 'Template::Plugin::autoformat' rather than 'Template::Plugin::Autoformat' (capital 'A') and it's succeeding when it should be failing.
The reason this changed between 2.23 and 2.24 is because I removed the explicit entry for 'autoformat' from Template::Plugins, given that it's now no longer in the core.
--- Template-Toolkit-2.23/lib/Template/Plugins.pm
+++ Template-Toolkit-2.24/lib/Template/Plugins.pm
@@ -33,7 +33,6 @@
our $PLUGIN_BASE = 'Template::Plugin';
our $STD_PLUGINS = {
'assert' => 'Template::Plugin::Assert',
- 'autoformat' => 'Template::Plugin::Autoformat',
I could add the entry back, but that would only be patching over the real problem which exists with all external plugins. I've raised an RT bug to remind me about it.
https://rt.cpan.org/Ticket/Display.html?id=74865
The short-term workaround is to use the correctly capitalised name in the USE directive.
<% USE Autoformat %>
Although you still have to use the lower case variant in the FILTER name.
<% FILTER autoformat %> ... <% END %>
Cheers
Andy
from template2.
Thanks Andy. I am running on FreeBSD. The docs for auto format plugin
still show it lower cased. I will update my use lines and move on to
bigger and better problems. :-)
On Feb 11, 2012, at 4:13 AM, Andy Wardley
[email protected]
wrote:
On 11/02/2012 05:22, Vick Khera wrote:
When processing a template which uses the autoformat filter, it fails with the complaint that it cannot find the filter.
[...]
plugin error - autoformat: plugin not foundHi Vick,
I'm guessing you're on a Mac. The problem is that Apple's HFS file system is case insensitive, so Template::Plugins is trying to load 'Template::Plugin::autoformat' rather than 'Template::Plugin::Autoformat' (capital 'A') and it's succeeding when it should be failing.
The reason this changed between 2.23 and 2.24 is because I removed the explicit entry for 'autoformat' from Template::Plugins, given that it's now no longer in the core.
--- Template-Toolkit-2.23/lib/Template/Plugins.pm
+++ Template-Toolkit-2.24/lib/Template/Plugins.pm
@@ -33,7 +33,6 @@
our $PLUGIN_BASE = 'Template::Plugin';
our $STD_PLUGINS = {
'assert' => 'Template::Plugin::Assert',
- 'autoformat' => 'Template::Plugin::Autoformat',
I could add the entry back, but that would only be patching over the real problem which exists with all external plugins. I've raised an RT bug to remind me about it.
https://rt.cpan.org/Ticket/Display.html?id=74865
The short-term workaround is to use the correctly capitalised name in the USE directive.
<% USE Autoformat %>
Although you still have to use the lower case variant in the FILTER name.
<% FILTER autoformat %> ... <% END %>
Cheers
Andy
Reply to this email directly or view it on GitHub:
#4 (comment)
from template2.
@khera worked around the issue
from template2.
Related Issues (20)
- Lingering references to cgi.t in release 3.100 HOT 1
- line number in debug mode when using OUTLINE mode HOT 2
- Extracting META data HOT 4
- t/html.t is looking for the wrong module HOT 1
- Exiting a MACRO early
- Assert always throws
- Test::Template should be based on Test::Builder for compatibilty HOT 2
- Template-Toolkit-3.101: Warning: the following files are missing in your kit
- Template-Toolkit-3.101: t/filter.t seems to contain locale-dependent tests. HOT 1
- Speed up html_entity by optionally using HTML::Escape HOT 6
- Compiled templates have incorrect line numbers for IF statements
- Consider updating to Perl 5.10 HOT 1
- test errors in 5.39.1 due to change in import logic HOT 6
- HTTPS with invalid cert for template-toolkit.org
- Update first question in the FAQ
- Document the parsing rules for arithmetic expressions
- Silent parsing failure when passing expressions to a MACRO
- Loop iterator variables not localized within the loop
- Outline tags must be placed at the start of the line HOT 4
- list.grep('0') returns no items
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from template2.