<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,7 @@
 Getopt-Chain-*
 Makefile
 inc
+DBICx-Sucrose
+Directory-Deploy
+Sd
+local</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,7 @@ our $DEBUG = DEBUG;
 
 =head1 NAME
 
-Getopt::Chain - Option and subcommand processing in the style svn(1) and git(1)
+Getopt::Chain - Option and subcommand processing in the style of svn and git
 
 =head1 VERSION
 
@@ -20,62 +20,6 @@ our $VERSION = '0.005';
 
 =head1 SYNPOSIS 
 
-    #!/usr/bin/perl -w
-
-    use strict;
-    use Getopt::Chain;
-
-    # A partial, pseudo-reimplementation of git(1):
-    
-    Getopt::Chain-&gt;process(
-
-        options =&gt; [qw/ version bare git-dir=s /]
-
-        run =&gt; sub {
-            my $context = shift;
-            my @arguments = @_; # Remaining, unparsed arguments
-
-            # ... do stuff before any subcommand ...
-
-        }
-
-        commands =&gt; {
-
-            init =&gt; {
-                options =&gt; [qw/ quiet|q --template=s /]
-                run =&gt; sub {
-                    my $context = shift;
-                    my @arguments = @_; # Again, remaining unparsed arguments 
-
-                    # ... do init stuff ...
-                }
-            }
-
-            commit =&gt; {
-                options =&gt; [qw/ all|a message|m=s /]
-                run =&gt; sub {
-                    my $context = shift;
-                    
-                    # ... do commit stuff ..
-                }
-            }
-
-            add =&gt; ...
-
-            help =&gt; ...
-
-            ...
-        }
-    )
-
-    # The above will allow the following (example) usage:
-    #
-    # ./script --version
-    # ./script --git-dir path/to/repository init
-    # ./script --git-dir path/to/repository commit -a --message '...'
-    # ./script commit -m '~'
-
-
 =head1 DESCRIPTION
 
 Getopt::Chain can be used to provide C&lt;svn(1)&gt;- and C&lt;git(1)&gt;-style option and subcommand processing. Any option specification
@@ -90,90 +34,6 @@ for the subcommand. For example:
 
 So, for now, try to use distinct option names/aliases :)
 
-Finally, this code fairly new so aspects of the API *might* change (particularly abort/error-handling). Let me know if you're using it and have any suggestions.
-
-TODO: Default values, option descriptions (like L&lt;Getopt::Long::Descriptive&gt;) and constraints (validation).
-
-=head1 Basic configuration
-
-A Getopt::Chain configuration is pretty straightforward
-
-Essentially you declare a command, which consists of (optional) &lt;options&gt; and an (optional) &lt;run&gt; subroutine (a CODE reference)
-
-&lt;options&gt; should be an ARRAY reference consisting of a L&lt;Getopt::Long&gt; specification
-
-&lt;run&gt; should be a CODE reference which is a subroutine that accepts a L&lt;Getopt::Chain::Context&gt; as the first argument and any remaining command-line
-arguments (left after option parsing) as the rest of @_
-
-A third parameter exists, &lt;commands&gt; in which you associate a &lt;name&gt; with a command, consisting (recursively) of &lt;options&gt;, &lt;run&gt;, and &lt;commands&gt;
-
-The &lt;name&gt; indicates what should be typed on the command-line to &quot;trigger&quot; the command. All-in-all, a configuration
-looks something like this:
-
-    options =&gt; [ ... ]
-
-    run =&gt; sub {}
-
-    commands =&gt; {
-
-        &lt;name1&gt; =&gt; {
-
-            options =&gt; [ ... ]
-
-            run =&gt; sub {}
-
-            commands =&gt; ...
-        },
-
-        &lt;name2&gt; =&gt; {
-            ...
-        },
-
-        ... Rinse, repeat, etc.
-    }
-
-See SYNPOSIS for an example
-
-=head1 Error-handling configuration
-
-Alongside &lt;options&gt;, &lt;run&gt;, and &lt;commands&gt;, you can designate a third parameter, &lt;error&gt; which is a either a CODE or HASH reference
-
-This is an error handler for dealing with the following situations:
-
-    option_processing_error     A Getopt::Long parsing error 
-
-    have_remainder              When a dash or dash-dash string remains on the argument stack without being processed 
-
-    unknown_command             When you've indicated that you want to accept a command but the user entered an unknown one
-
-You can either give a single subroutine to deal with all three, or give a HASH with:
-
-=over
-
-=item A subroutine for dealing with that specific error
-
-=item A value of '0' for disabling/ignoring that error
-
-=back
-
-For more detail (for now), look at the source:
-
-    perldoc -m Getopt::Chain
-
-=head1 METHODS
-
-=head2 Getopt::Chain-&gt;process( &lt;arguments&gt;, ... )
-
-&lt;arguments&gt; should be an ARRAY reference
-
-... should consist of a Getopt::Chain configuration
-
-=head2 Getopt::Chain-&gt;process( ... )
-
-@ARGV will be used for &lt;arguments&gt;
-
-... should consist of a Getopt::Chain configuration
-
 =cut
 
 use Moose;
@@ -194,44 +54,6 @@ sub process {
         carp &quot;Deprecated: Use Getopt::Chain::v005-&gt;process( ... ) to avoid this warning&quot;;
         return Getopt::Chain::v005-&gt;process( @_ );
     }
-#    my $self = shift;
-#    unless (ref $self) {
-#        my @process;
-#        push @process, shift if ref $_[0] eq &quot;ARRAY&quot;;
-#        my $self = $self-&gt;new;
-#        $self-&gt;parse( @_ );
-#        return $self-&gt;process(@process);
-#    }
-#    my $self = shift;
-#    return $self-&gt;run( @_ );
-}
-
-sub parse {
-    my $self = shift;
-    my %schema = @_;
-
-    $self-&gt;_parse_command( [] =&gt; \%schema );
-}
-
-sub _parse_command {
-    my $self = shift;
-    my $path = shift;
-    my $schema = shift;
-
-    if ( ref $schema eq 'CODE' ) {
-        $schema = { run =&gt; $schema };
-    }
-
-    my $path_as_string = join ' ', @$path;
-    warn &quot;Chain::_parse_command &lt;$path_as_string&gt;&quot; if $DEBUG;
-    $self-&gt;builder-&gt;on( $path_as_string =&gt; ($schema-&gt;{options}, $schema-&gt;{run}), always_run =&gt; 1 );
-
-    if ( my $commands = $schema-&gt;{commands} ) {
-
-        while( my ($command, $schema) = each %$commands ) {
-            $self-&gt;_parse_command( [ @$path, $command ] =&gt; $schema );
-        }
-    }
 }
 
 sub run {</diff>
      <filename>lib/Getopt/Chain.pm</filename>
    </modified>
    <modified>
      <diff>@@ -15,6 +15,116 @@ use Hash::Param;
 use constant DEBUG =&gt; Getopt::Chain-&gt;DEBUG;
 our $DEBUG = DEBUG;
 
+=head1 NAME
+
+Getopt::Chain::Context - Per-command context
+
+=head1 DESCRIPTION
+
+A context encapsulates the current state of execution, including:
+
+    The name of the current command (or undef if at the &quot;root&quot;)
+    Every option parsed so far
+    Options local to the current command
+    The arguments as they were BEFORE parsing options for this command
+    The arguments remaining AFTER parsing options for this command
+
+=head1 METHODS
+
+=head2 $context-&gt;command
+
+Returns the name of the current command (or undef in a special case)
+
+    ./script --verbose edit --file xyzzy.c 
+    # The command name is &quot;edit&quot; in the edit subroutine
+
+    ./script --help
+    # The command name is undef in the root subroutine
+
+=head2 $context-&gt;option( &lt;name&gt; )
+
+Returns the value of the option for &lt;name&gt; 
+
+&lt;name&gt; should be primary name of the option (see L&lt;Getopt::Long&gt; for more information
+on primary/alias naming)
+
+If called in list context and the value of option is an ARRAY reference,
+then this method returns a list:
+
+    ./script --exclude apple --exclude banana --exclude --cherry
+    ...
+    my @exclude = $context-&gt;option( exclude )
+
+See L&lt;Hash::Param&gt; for more usage information
+
+=head2 $context-&gt;options( &lt;name&gt;, &lt;name&gt;, ... )
+
+Similar to -&gt;option( &lt;name&gt; ) except for many-at-once
+
+Returns a list in list context, and an ARRAY reference otherwise (you could
+end up with a LoL situation in that case)
+
+See L&lt;Hash::Param&gt; for more usage information
+
+=head2 $context-&gt;options
+
+Returns the keys of the option hash in list context
+
+Returns the option HASH reference in scalar context
+
+    ./script --verbose
+    ...
+    if ( $context-&gt;options-&gt;{verbose} ) { ... }
+
+See L&lt;Hash::Param&gt; for more usage information
+
+=head2 $context-&gt;local_option
+
+=head2 $context-&gt;local_options
+
+Behave similarly to -&gt;option and -&gt;options, except only cover options local to the current command
+
+    ./script --verbose edit --file xyzzy.c
+    $context-&gt;local_option( file ) # Returns 'xyzzy.c'
+    $context-&gt;local_option( verbose ) # Doesn't return anything
+    $context-&gt;option( verbose ) # Returns 1
+
+=head2 $context-&gt;stash
+
+An initially empty  HASH reference that can be used for sharing inter-command information
+
+Similar to the stash in L&lt;Catalyst&gt;
+
+=head2 $context-&gt;arguments
+
+Returns a copy of the arguments (@ARGV) for the current command BEFORE option parsing
+
+Returns an ARRAY reference (still a copy) when called in scalar context
+
+    ./script --verbose edit --file xyzzy.c
+
+    # At the very beginning: 
+    $context-&gt;arguments # Returns ( --verbose edit --file xyzzy.c )
+
+    # In the &quot;edit&quot; subroutine:
+    $context-&gt;arguments # Returns ( edit --file xyzzy.c )
+
+=head2 $context-&gt;remaining_arguments
+
+Returns a copy of the remaining arguments (@ARGV) for the current command AFTER option parsing
+
+Returns an ARRAY reference (still a copy) when called in scalar context
+
+    ./script --verbose edit --file xyzzy.c
+
+    # At the very beginning: 
+    $context-&gt;remaining_arguments # Returns ( edit --file xyzzy.c )
+
+    # In the &quot;edit&quot; subroutine:
+    $context-&gt;remaining_arguments # Returns ( )
+
+=cut
+
 # Should probably move these into Getopt::Chain
 # ...or even... Getopt::Longer :)
 sub is_option_like($) {
@@ -252,326 +362,3 @@ sub run {
 
 1;
 
-__END__
-
-=head1 NAME
-
-Getopt::Chain::Context - Per-command context
-
-=head1 DESCRIPTION
-
-A context encapsulates the current state of execution, including:
-
-    The name of the current command (or undef if at the &quot;root&quot;)
-    Every option parsed so far
-    Options local to the current command
-    The arguments as they were BEFORE parsing options for this command
-    The arguments remaining AFTER parsing options for this command
-
-=head1 METHODS
-
-=head2 $context-&gt;command
-
-Returns the name of the current command (or undef in a special case)
-
-    ./script --verbose edit --file xyzzy.c 
-    # The command name is &quot;edit&quot; in the edit subroutine
-
-    ./script --help
-    # The command name is undef in the root subroutine
-
-=head2 $context-&gt;option( &lt;name&gt; )
-
-Returns the value of the option for &lt;name&gt; 
-
-&lt;name&gt; should be primary name of the option (see L&lt;Getopt::Long&gt; for more information
-on primary/alias naming)
-
-If called in list context and the value of option is an ARRAY reference,
-then this method returns a list:
-
-    ./script --exclude apple --exclude banana --exclude --cherry
-    ...
-    my @exclude = $context-&gt;option( exclude )
-
-See L&lt;Hash::Param&gt; for more usage information
-
-=head2 $context-&gt;options( &lt;name&gt;, &lt;name&gt;, ... )
-
-Similar to -&gt;option( &lt;name&gt; ) except for many-at-once
-
-Returns a list in list context, and an ARRAY reference otherwise (you could
-end up with a LoL situation in that case)
-
-See L&lt;Hash::Param&gt; for more usage information
-
-=head2 $context-&gt;options
-
-Returns the keys of the option hash in list context
-
-Returns the option HASH reference in scalar context
-
-    ./script --verbose
-    ...
-    if ( $context-&gt;options-&gt;{verbose} ) { ... }
-
-See L&lt;Hash::Param&gt; for more usage information
-
-=head2 $context-&gt;local_option
-
-=head2 $context-&gt;local_options
-
-Behave similarly to -&gt;option and -&gt;options, except only cover options local to the current command
-
-    ./script --verbose edit --file xyzzy.c
-    $context-&gt;local_option( file ) # Returns 'xyzzy.c'
-    $context-&gt;local_option( verbose ) # Doesn't return anything
-    $context-&gt;option( verbose ) # Returns 1
-
-=head2 $context-&gt;stash
-
-An initially empty  HASH reference that can be used for sharing inter-command information
-
-Similar to the stash in L&lt;Catalyst&gt;
-
-=head2 $context-&gt;arguments
-
-Returns a copy of the arguments (@ARGV) for the current command BEFORE option parsing
-
-Returns an ARRAY reference (still a copy) when called in scalar context
-
-    ./script --verbose edit --file xyzzy.c
-
-    # At the very beginning: 
-    $context-&gt;arguments # Returns ( --verbose edit --file xyzzy.c )
-
-    # In the &quot;edit&quot; subroutine:
-    $context-&gt;arguments # Returns ( edit --file xyzzy.c )
-
-=head2 $context-&gt;remaining_arguments
-
-Returns a copy of the remaining arguments (@ARGV) for the current command AFTER option parsing
-
-Returns an ARRAY reference (still a copy) when called in scalar context
-
-    ./script --verbose edit --file xyzzy.c
-
-    # At the very beginning: 
-    $context-&gt;remaining_arguments # Returns ( edit --file xyzzy.c )
-
-    # In the &quot;edit&quot; subroutine:
-    $context-&gt;remaining_arguments # Returns ( )
-
-=head2 $context-&gt;abort( [ ... ] )
-
-Immediately exit the process with exit code of -1
-
-If the optional ... (message) is given, then print that out to STDERR first
-
-=head1 SEE ALSO
-
-L&lt;Getopt::Chain&gt;
-
-=cut
-
-use Hash::Param;
-
-has options =&gt; qw/reader _options lazy_build 1 isa HashRef/;
-sub _build_options {
-    my $self = shift;
-    return {};
-}
-
-has options_ =&gt; qw/is ro isa Hash::Param lazy_build 1/, handles =&gt; {qw/option param options params/};
-sub _build_options_ {
-    my $self = shift;
-    return Hash::Param-&gt;new(params =&gt; $self-&gt;_options);
-}
-
-has chain =&gt; qw/is ro isa ArrayRef/, default =&gt; sub { [] };
-
-has stash =&gt; qw/is ro isa HashRef/, default =&gt; sub { {} };
-
-sub BUILD {
-    my $self = shift;
-    my $given = shift;
-}
-
-sub push {
-    my $self = shift;
-    my $link = Getopt::Chain::Context::Link-&gt;new(context =&gt; $self, @_);
-    push @{ $self-&gt;chain }, $link;
-    return $link;
-}
-
-sub pop {
-    my $self = shift;
-    pop @{ $self-&gt;chain };
-}
-
-sub run {
-    my $self = shift;
-    my $path = shift || &quot;&quot;;
-
-    my @path = grep { length $_ } split m/[ \/]+/, $path;
-
-    my $link = $self-&gt;link;
-    my $processor = $self-&gt;link(0)-&gt;processor;
-    for (@path) {
-        # TODO Probably call this 'resolve'
-        $processor = $processor-&gt;commands-&gt;{$_} or croak &quot;Couldn't traverse $path: $_ not found&quot;;
-    }
-
-    $self-&gt;push(processor =&gt; $processor, command =&gt; $path[-1],
-        arguments =&gt; $link-&gt;_arguments, remaining_arguments =&gt; $link-&gt;_remaining_arguments, options =&gt; scalar $link-&gt;options);
-
-    $processor-&gt;run-&gt;($self, @_);
-
-    $self-&gt;pop;
-}
-
-sub update {
-    my $self = shift;
-
-    my $link = $self-&gt;link;
-
-    my $local_options = $self-&gt;local_options_;
-    my $options = $self-&gt;options_;
-
-    for my $key ($local_options-&gt;params) {
-        $options-&gt;param($key =&gt; scalar $local_options-&gt;param($key));
-    }
-}
-
-sub link {
-    my $self = shift;
-    my $at = shift;
-
-    $at = -1 unless defined $at;
-    return $self-&gt;chain-&gt;[$at];
-}
-
-sub local_option {
-    my $self = shift;
-    return $self-&gt;link-&gt;option(@_);
-}
-
-sub local_options {
-    my $self = shift;
-    return $self-&gt;link-&gt;options(@_);
-}
-
-sub local_options_ {
-    my $self = shift;
-    return $self-&gt;link-&gt;options_(@_);
-}
-
-for my $method (qw/processor command arguments remaining_arguments remainder valid/) {
-    no strict 'refs';
-    *$method = sub {
-        my $self = shift;
-        return $self-&gt;link-&gt;$method(@_);
-    };
-}
-
-sub abort {
-    my $self = shift;
-    print STDERR &quot;$0: &quot;;
-    if (@_) {
-        my @__ = @_; # Modification of read-only value ...
-        chomp $__[-1];
-        print STDERR join &quot;&quot;, @__, &quot;\n&quot;;
-    }
-    else {
-        print STDERR &quot;Unknown error: aborting&quot;;
-    }
-    exit -1;
-}
-
-package Getopt::Chain::Context::Link;
-
-use Moose;
-use Getopt::Chain::Carp;
-
-use Hash::Param;
-
-has context =&gt; qw/is ro required 1 isa Getopt::Chain::Context/, handles =&gt; [qw/all_options/];
-
-has processor =&gt; qw/is ro required 1 isa Getopt::Chain/;
-
-has command =&gt; qw/is ro required 1 isa Maybe[Str]/;
-
-has options =&gt; qw/reader _options required 1 isa HashRef/;
-
-has options_ =&gt; qw/is ro isa Hash::Param lazy_build 1/, handles =&gt; {qw/option param options params/};
-sub _build_options_ {
-    my $self = shift;
-    return Hash::Param-&gt;new(params =&gt; $self-&gt;_options);
-}
-
-has arguments =&gt; qw/is ro reader _arguments required 1 isa ArrayRef/;
-sub arguments {
-    my @arguments = @{ shift-&gt;_arguments };
-    return wantarray ? @arguments : \@arguments; 
-}
-
-has remaining_arguments =&gt; qw/is ro reader _remaining_arguments required 1 isa ArrayRef/;
-sub remaining_arguments {
-    my @arguments = @{ shift-&gt;_remaining_arguments };
-    return wantarray ? @arguments : \@arguments; 
-}
-
-sub remainder {
-    return scalar shift-&gt;remaining_arguments;
-}
-
-has valid =&gt; qw/is rw/;
-
-1;
-
-__END__
-
-sub options {
-    my $self = shift;
-
-    if (@_) {
-        return $self-&gt;option(@_);
-    }
-    else {
-        return wantarray ? keys %{ $self-&gt;_options } : $self-&gt;_options;
-    }
-}
-
-sub option {
-    my $self = shift;
-
-    if (@_ == 0) {
-        return $self-&gt;options;
-    }
-
-    if (@_ == 1) {
-
-        my $option = shift;
-
-        unless (exists $self-&gt;_options-&gt;{$option}) {
-            return wantarray ? () : undef;
-        }
-
-        if (ref $self-&gt;_options-&gt;{$option} eq 'ARRAY') {
-            return (wantarray)
-              ? @{ $self-&gt;_options-&gt;{$option} }
-              : $self-&gt;_options-&gt;{$option}-&gt;[0];
-        }
-        else {
-            return (wantarray)
-              ? ($self-&gt;_options-&gt;{$option})
-              : $self-&gt;_options-&gt;{$option};
-        }
-    }
-    elsif (@_ &gt; 1) {
-        my @options = map { scalar $self-&gt;option($_) } @_;
-        return wantarray ? @options : \@options;
-    }
-}
-
-1;</diff>
      <filename>lib/Getopt/Chain/Context.pm</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2885726c4b555fce8a83e0c5e58030d40d4b7971</id>
    </parent>
  </parents>
  <author>
    <name>robertkrimen</name>
    <email>robertkrimen@gmail.com</email>
  </author>
  <url>http://github.com/robertkrimen/Getopt-Chain/commit/ab0b6c1f73cb6887058b93eaec5d5bbd301be48c</url>
  <id>ab0b6c1f73cb6887058b93eaec5d5bbd301be48c</id>
  <committed-date>2009-05-11T13:56:35-07:00</committed-date>
  <authored-date>2009-05-11T13:56:35-07:00</authored-date>
  <message>Boilerplate documentation, but need to rework</message>
  <tree>bb951465ec9fe20af335378365b7104418f8e9e9</tree>
  <committer>
    <name>robertkrimen</name>
    <email>robertkrimen@gmail.com</email>
  </committer>
</commit>
