| 1 |
#!/usr/bin/env perl |
| 2 |
use 5.010; |
| 3 |
use open qw< :encoding(utf8) :std >; |
| 4 |
use Dir::Self; |
| 5 |
use Moose; |
| 6 |
use Encode qw< decode >; |
| 7 |
use Bot::Training; |
| 8 |
use namespace::clean -except => 'meta'; |
| 9 |
|
| 10 |
# Nothing to see here |
| 11 |
__PACKAGE__->meta->make_immutable; |
| 12 |
|
| 13 |
# use utf8 everywhere |
| 14 |
$_ = decode('utf8', $_) for @ARGV; |
| 15 |
|
| 16 |
# I want my mommy! |
| 17 |
{ no warnings 'once'; |
| 18 |
$Bot::Training::HERE_MOMMY = __DIR__; } |
| 19 |
|
| 20 |
# Show help if run without arguments |
| 21 |
@ARGV = qw(--help) unless @ARGV; |
| 22 |
|
| 23 |
# Hailing frequencies open |
| 24 |
exit(Bot::Training->new_with_options->run // 0); |
| 25 |
|
| 26 |
=encoding utf8 |
| 27 |
|
| 28 |
=head1 NAME |
| 29 |
|
| 30 |
bot-training - Command-line interface L<Bot::Training> |
| 31 |
|
| 32 |
=head1 SYNOPSIS |
| 33 |
|
| 34 |
# Install all known training files from CPAN |
| 35 |
sudo cpan Task::Bot::Training |
| 36 |
|
| 37 |
# Spew the megahal training file(provided by |
| 38 |
# Bot::Training::MegaHAL) file to STDOUT) |
| 39 |
bot-training -f megahal |
| 40 |
|
| 41 |
# List the currently available training files |
| 42 |
bot-training -l |
| 43 |
|
| 44 |
=head1 DESCRIPTION |
| 45 |
|
| 46 |
See the documentation for L<Bot::Training> for more information. |
| 47 |
|
| 48 |
=head1 AUTHOR |
| 49 |
|
| 50 |
E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason <[email protected]> |
| 51 |
|
| 52 |
=head1 LICENSE AND COPYRIGHT |
| 53 |
|
| 54 |
Copyright 2010 E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason <[email protected]> |
| 55 |
|
| 56 |
This program is free software, you can redistribute it and/or modify |
| 57 |
it under the same terms as Perl itself. |
| 58 |
|
| 59 |
=cut |