X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FAdmin%2FUsage.pm;h=ce41a563f65641c92e91cc74d81a7a4eda16fc63;hb=3b80fa31b60050d4c8df91457ba6fd51b579a7a6;hp=291fd1ed45246bc8eea8bf6bec39f479100743c8;hpb=7d6f6a6ebc1523840fe942a4ea2a21ab467e002d;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Admin/Usage.pm b/lib/DBIx/Class/Admin/Usage.pm index 291fd1e..ce41a56 100644 --- a/lib/DBIx/Class/Admin/Usage.pm +++ b/lib/DBIx/Class/Admin/Usage.pm @@ -6,8 +6,6 @@ use base 'Getopt::Long::Descriptive::Usage'; use base 'Class::Accessor::Grouped'; -use Class::C3; - __PACKAGE__->mk_group_accessors('simple', 'synopsis', 'short_description'); sub prog_name { @@ -22,13 +20,8 @@ sub set_simple { } -=head2 pod - -This returns the usage formated as a pod document - -=cut - +# This returns the usage formated as a pod document sub pod { my ($self) = @_; return join qq{\n}, $self->pod_leader_text, $self->pod_option_text, $self->pod_authorlic_text; @@ -44,17 +37,13 @@ sub pod_leader_text { sub pod_authorlic_text { - return <<'EOA' -=head1 AUTHORS - -See L - -=head1 LICENSE - -You may distribute this code under the same terms as Perl itself - -=cut -EOA + return join ("\n\n", + '=head1 AUTHORS', + 'See L', + '=head1 LICENSE', + 'You may distribute this code under the same terms as Perl itself', + '=cut', + ); } @@ -69,6 +58,7 @@ sub pod_option_text { foreach my $opt (@options) { my $spec = $opt->{spec}; my $desc = $opt->{desc}; + next if ($desc eq 'hidden'); if ($desc eq 'spacer') { $string .= "=back\n\n=head2 $spec\n\n=cut\n\n=over\n\n"; next;