+sub Usage($) {
+ my ($s) = @_;
+ my $usage = <<FOE ;
+Usage: $0 <options>
+
+Options:
+--[no]verbose Be chatty about the inner workings of the release system {verbose}
+--[no]test Test the package before uploading {do_test}
+--[no]patch Make a patch against the previous version {do_patch}
+--diff-against=<ver> Set which version we create the patch against
+--[no]upload Upload released files {do_upload}
+--[no]git-tag Tag the Git repository with "v<version>" {do_git_tag}
+--force-git-tag Rewrite the Git tag if it already exists {force_git_tag}
+FOE
+ sub state($) {
+ return "(default: " . ($_ ? "on" : "off") . ")";
+ }
+ $usage =~ s[{(\w+)}][state($s->{$1})]ge;
+ die $usage;
+}
+