expose print_usage_text() as public method
[gitmo/MooseX-Getopt.git] / lib / MooseX / Getopt.pm
index 6ad6e1c..364e507 100644 (file)
@@ -236,6 +236,14 @@ L<Getopt::Long::Descriptive> is used).
 This accessor contains the boolean state of the --help, --usage and --?
 options (true if any of these options were passed on the command line).
 
+=method B<print_usage_text>
+
+This method is called internally when the C<help_flag> state is true.
+It prints the text from the C<usage> object (see above) to stdout and then the
+program terminates normally.  You can apply a method modification (see
+L<Moose::Manual::MethodModifiers>) if different behaviour is desired, for
+example to include additional text.
+
 =method B<meta>
 
 This returns the role meta object.