[Catalyst] create controller 'option' -mechanize fails

Thomas L. Shinnick tshinnic at io.com
Tue Jan 19 21:22:56 GMT 2010


I'm confused about the 'options' to script/foo_create.pl .  Nothing 
seems to work as documented.

Run without any parameters foo_create.pl says
     Usage:
         foo_create.pl [options] model|view|controller name [helper] [options]
          Options:
            --force        don't create a .new file where a file to 
be created exists
            --mechanize    use Test::WWW::Mechanize::Catalyst for 
tests if available
            --help         display this help and exits
          Examples:
            foo_create.pl controller My::Controller
            foo_create.pl -mechanize controller My::Controller

Note already the disagreement between "--mechanize" and "-mechanize".

When I try either of these forms before the 'controller' or after all 
other parameters I get an error apparently saying the options were 
not interpreted correctly.   Such as
         Unknown option: m
         Unknown option: e
         Unknown option: c
         Unknown option: a     (note absence of 'h' !)
         Unknown option: n
         Unknown option: i
         Unknown option: z
         Unknown option: e
or
         Couldn't load helper 
"Catalyst::Helper::Controller::--mechanize", "syntax error at (eval 
276) line 1, near "require Catalyst::Helper::Controller::--""

Why aren't options being understood as documented?  For instance, 
"--force" also explodes. But "-h" just shows the help without exploding.  >-(

I see  comptest.tt  has sample code for including mechanize - is this 
valid for controllers?

(Note: I'm up-to-date on all Catalyst components according to CPAN, 
e.g. Catalyst::Devel 1.26)




More information about the Catalyst mailing list