I found a solution to my problem, though from the opposite direction. I had enough free time this weekend to delve into Catalyst's innards and trace the path of the code. The BUILD sub of Catalyst::Restarter is where the list of directories to monitor is set. There's a parameter called "exclude," and it's set to exclude "t" and "root" from monitoring as well as any hidden directories. There appears to be no way to add to or override that list though.
Catalyst::Script::Server is where the restarter is called, and you can pass a few parameters to it from there, including this one:
--rdir --restart_directory the directory to search for modified files, can be set multiple times (defaults to '[SCRIPT_DIR]/..')
So it appears that you can set what directories to monitor but not set what to exclude. I can call the server with --rdir as the "lib" directory instead of the project root, which seems really the only one that needs monitoring anyway, and not have to worry about node_modules or any directories such as those with my Sass files being added to the weight of the server. If I find that anything else needs to be monitored, I can add to it, as --rdir takes an array reference of directories. So calling the server like so works for this problem:
script/myapp_server.pl --rdir /full/path/to/lib -rIt still would be nice to have an option to exclude directories, though, for those occasions when you only need to do so to one rather than having to build up a list of multiple approved directories, but at least there's a way to handle the issue.
In reply to Re^3: Ignoring directories in Catalyst
by LunarCowgirl
in thread Ignoring directories in Catalyst
by LunarCowgirl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |