X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Getopt.git;a=blobdiff_plain;f=lib%2FMooseX%2FGetopt.pm;h=229b2beb0d7d00bb5b8bab8cc65722d4d9d9f5f3;hp=8c2f4b0a3c84d38a7309cbc2974058a2b26415be;hb=3d9a716d3b164a29df44de04ceb99711c0583420;hpb=e2911e34263bf6cfcd0e81fe5c801bdd71e48a29 diff --git a/lib/MooseX/Getopt.pm b/lib/MooseX/Getopt.pm index 8c2f4b0..229b2be 100644 --- a/lib/MooseX/Getopt.pm +++ b/lib/MooseX/Getopt.pm @@ -114,7 +114,17 @@ to get non-default commandline option names and aliases. By default, attributes which start with an underscore are not given commandline argument support, unless the attribute's metaclass is set -to L. +to L. If you don't want you accessors +to have the leading underscore in thier name, you can do this: + + # for read/write attributes + has '_foo' => (accessor => 'foo', ...); + + # or for read-only attributes + has '_bar' => (reader => 'bar', ...); + +This will mean that Getopt will not handle a --foo param, but your +code can still call the C method. =head2 Supported Type Constraints