[Catalyst-dev] Cookbook patch showing basic setup_components usage
Jonathan Rockway
jon at jrock.us
Wed Sep 6 16:02:18 CEST 2006
Just for the record, M::P skips CVS and SVN already. You are using a
weird version control system :) Thanks for the report, though.
However, we never resolved the skipping issues, though, and probably
need to come up with a better exclude list for the next release. My
suggestions is:
files:
^[.]#.+# 'emacs
~$ 'backup files
directories:
^[.].+$ 'hidden directories
CVS
SCCS
Please add to this list if there's something else you think we should skip.
I'm not sure that M::P::O can determine whether or not a path is a file
or directory. If not, we might need to add this functionality (to avoid
the hell that is filesystem item separators inside regexes).
Regards,
Jonathan Rockway
Martijn van de Streek wrote:
> Hi,
>
> I've written a short section in Cookbook.pod which explains how to use
> the 'setup_components' config option to skip loading modules from the
> directories some version control systems create.
>
> Martijn
>
>
> ------------------------------------------------------------------------
>
> --- /usr/local/share/perl/5.8.7/Catalyst/Manual/Cookbook.pod 2006-07-19 23:45:17.000000000 +0200
> +++ Cookbook.pod 2006-09-06 15:05:24.000000000 +0200
> @@ -205,6 +205,25 @@
>
> See also L<YAML>.
>
> +=head3 Skipping your VCS's directories
> +
> +Catalyst uses Module::Pluggable to load Models, Views and Controllers.
> +Module::Pluggable will scan through all directories and load modules it finds.
> +Sometimes you might want to skip some of these directories, for example when
> +your version control system makes a subdirectory with meta-information in every
> +version-controlled directory.
> +
> +You can make catalyst skip these directories using the Catalyst config:
> +
> + # Configure the application
> + __PACKAGE__->config(
> + name => 'MyApp',
> + setup_components => { except => qr/SCCS/ },
> + );
> +
> +See the Module::Pluggable manual page for more information on B<except>
> +and other options.
> +
> =head1 Users and Access Control
>
> Most multiuser, and some single user web applications require that
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst-dev
More information about the Catalyst-dev
mailing list