[Catalyst] OT Config::General question
Jesse Sheidlower
jester at panix.com
Thu Nov 6 23:13:20 GMT 2008
I want to set up my new PageCache configuration in a
Config::General style. I need to change this:
__PACKAGE__->config(
'Plugin::PageCache' => {
expires => 300,
set_http_headers => 1,
auto_cache => [ '^(search)' ]
debug => 1,
}
);
into this:
<Plugin::PageCache>
expires 3600
set_http_headers 1
auto_cache [ '^(search)' ] # uh...
debug 1
</Plugin::PageCache>
The problem is, auto_cache needs to be an arrayref even though
there's only a single item in it, and I don't know how to
force Config::General to interpret it this way; if it's in the
docs, I'm missing it. Right now I get an error like
Caught exception in engine "Can't use string ("[ '^(search)' ]")
as an ARRAY ref while "strict refs" in use
I get the same error if I try to remove the brackets.
If I add another line like "auto_cache *", then things just
work, because with two identically named lines it assumes an
array, but I assume there has to be a way to make C::G read
this as an arrayref?
Thanks.
Jesse
More information about the Catalyst
mailing list