Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to parse the canonical case: #5

Open
alexchandel opened this issue Feb 21, 2015 · 1 comment
Open

Fails to parse the canonical case: #5

alexchandel opened this issue Feb 21, 2015 · 1 comment

Comments

@alexchandel
Copy link

It's not entirely clear how this module works with POD, but it fails to parse the canonical Navel Fate case:

This fails with the error [Docopt::Exceptions::DocoptLanguageError] unmatched '(':

use warnings;
use strict;
use Docopt;

my $opts = docopt();

__END__

=head1 SYNOPSIS

    naval_fate ship new <name>...
    naval_fate ship <name> move <x> <y> [--speed=<kn>]
    naval_fate ship shoot <x> <y>
    naval_fate mine (set|remove) <x> <y> [--moored|--drifting]
    naval_fate -h | --help
    naval_fate --version

Options:
    -h --help     Show this screen.
    --version     Show version.
    --speed=<kn>  Speed in knots [default: 10].
    --moored      Moored (anchored) mine.
    --drifting    Drifting mine.

This prints only the Usage: section:

use warnings;
use strict;
use Docopt;

my $opts = docopt();

__END__

=head1 SYNOPSIS

    naval_fate ship new <name>...
    naval_fate ship <name> move <x> <y> [--speed=<kn>]
    naval_fate ship shoot <x> <y>
    naval_fate mine (set|remove) <x> <y> [--moored|--drifting]
    naval_fate -h | --help
    naval_fate --version

=head1 OPTIONS

    -h --help     Show this screen.
    --version     Show version.
    --speed=<kn>  Speed in knots [default: 10].
    --moored      Moored (anchored) mine.
    --drifting    Drifting mine.
@tokuhirom
Copy link
Owner

Patches welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants