Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
print USAGE message to $*ERR, just because it feels right-isher
Also run new test main-usage.t
  • Loading branch information
moritz committed Jun 10, 2010
1 parent ec2694e commit c43bca7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/MAIN.pm
Expand Up @@ -113,5 +113,5 @@ our sub MAIN_HELPER() {
return if $correct-main-found;
}
my $help = USAGE($m);
$help.say;
$*ERR.say: $help;
}
1 change: 1 addition & 0 deletions t/spectest.data
Expand Up @@ -332,6 +332,7 @@ S06-operator-overloading/sub.t
S06-other/anon-hashes-vs-blocks.t
S06-other/main.t
S06-other/main-eval.t
S06-other/main-usage.t
S06-other/misc.t
S06-routine-modifiers/scoped-named-subs.t
S06-signature/arity.t
Expand Down

1 comment on commit c43bca7

@avar
Copy link
Contributor

@avar avar commented on c43bca7 Jun 11, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't, it's very annoying when programs break the equivalent of:

perl --help | less

Perl 5, all GNU utilities etc. adhere to this convention.

STDERR should be reserved for error output. When you use --help the usage isn't error output, it's the stuff you were asking for.

Please sign in to comment.