Permalink
Browse files

Update meta files

  • Loading branch information...
1 parent 4481736 commit c55f2d9dcc11b260f836a6e6f4b0b59772defb27 @doherty committed Nov 26, 2012
Showing with 250 additions and 48 deletions.
  1. +46 −0 Build.PL
  2. +1 −10 MANIFEST.SKIP
  3. +28 −25 Makefile.PL
  4. +7 −13 README
  5. +168 −0 README.mkdn
View
@@ -0,0 +1,46 @@
+
+use strict;
+use warnings;
+
+use Module::Build 0.3601;
+
+
+my %module_build_args = (
+ "build_requires" => {
+ "File::Find" => 0,
+ "File::Temp" => 0,
+ "Module::Build" => "0.3601",
+ "Test::Builder" => "0.94",
+ "Test::More" => "0.94"
+ },
+ "configure_requires" => {
+ "Module::Build" => "0.3601"
+ },
+ "dist_abstract" => "comprehensively parse boolean response strings",
+ "dist_author" => [
+ "Mike Doherty <doherty\@cpan.org>"
+ ],
+ "dist_name" => "Lingua-Boolean",
+ "dist_version" => "0.007",
+ "license" => "perl",
+ "module_name" => "Lingua::Boolean",
+ "recommends" => {},
+ "recursive_test_files" => 1,
+ "requires" => {
+ "Carp" => 0,
+ "Exporter" => 0,
+ "Module::Pluggable" => 0,
+ "String::Trim" => 0,
+ "boolean" => "0.21",
+ "perl" => "5.010001",
+ "strict" => 0,
+ "utf8" => 0,
+ "warnings" => 0
+ },
+ "script_files" => []
+);
+
+
+my $build = Module::Build->new(%module_build_args);
+
+$build->create_build_script;
View
@@ -1,5 +1,3 @@
-
-#!start included /usr/local/share/perl/5.10.1/ExtUtils/MANIFEST.SKIP
# Avoid version control files.
\bRCS\b
\bCVS\b
@@ -55,12 +53,5 @@
# Avoid MYMETA files
^MYMETA\.
-#!end included /usr/local/share/perl/5.10.1/ExtUtils/MANIFEST.SKIP
-
-# Specific to this project
-^dist\.ini$
-^MANIFEST\.SKIP$
-^\.build$
-^weaver\.ini$
-^script\.pl$
+Lingua-Boolean-*
View
@@ -2,39 +2,42 @@
use strict;
use warnings;
-BEGIN { require 5.010001; }
+use 5.010001;
-use ExtUtils::MakeMaker 6.31;
+use ExtUtils::MakeMaker 6.30;
my %WriteMakefileArgs = (
- 'ABSTRACT' => 'comprehensively parse boolean response strings',
- 'AUTHOR' => 'Mike Doherty <doherty@cpan.org>',
- 'BUILD_REQUIRES' => {
- 'File::Find' => '0',
- 'File::Temp' => '0',
- 'Test::Builder' => '0.94',
- 'Test::More' => '0.94'
+ "ABSTRACT" => "comprehensively parse boolean response strings",
+ "AUTHOR" => "Mike Doherty <doherty\@cpan.org>",
+ "BUILD_REQUIRES" => {
+ "File::Find" => 0,
+ "File::Temp" => 0,
+ "Module::Build" => "0.3601",
+ "Test::Builder" => "0.94",
+ "Test::More" => "0.94"
},
- 'CONFIGURE_REQUIRES' => {
- 'ExtUtils::MakeMaker' => '6.31'
+ "CONFIGURE_REQUIRES" => {
+ "Module::Build" => "0.3601"
},
- 'DISTNAME' => 'Lingua-Boolean',
- 'EXE_FILES' => [],
- 'LICENSE' => 'perl',
- 'NAME' => 'Lingua::Boolean',
- 'PREREQ_PM' => {
- 'Carp' => '0',
- 'Exporter' => '0',
- 'Module::Pluggable' => '0',
- 'String::Trim' => '0',
- 'boolean' => '0.21',
- 'utf8' => '0'
+ "DISTNAME" => "Lingua-Boolean",
+ "EXE_FILES" => [],
+ "LICENSE" => "perl",
+ "NAME" => "Lingua::Boolean",
+ "PREREQ_PM" => {
+ "Carp" => 0,
+ "Exporter" => 0,
+ "Module::Pluggable" => 0,
+ "String::Trim" => 0,
+ "boolean" => "0.21",
+ "strict" => 0,
+ "utf8" => 0,
+ "warnings" => 0
},
- 'VERSION' => '0.006',
- 'test' => {
- 'TESTS' => 't/*.t t/lang/*.t'
+ "VERSION" => "0.007",
+ "test" => {
+ "TESTS" => "t/*.t t/lang/*.t"
}
);
View
20 README
@@ -2,7 +2,7 @@ NAME
Lingua::Boolean - comprehensively parse boolean response strings
VERSION
- version 0.006
+ version 0.007
SYNOPSIS
use Lingua::Boolean;
@@ -44,7 +44,7 @@ DESCRIPTION
a single module, and do so for multiple languages.
METHODS
- "Lingua::Boolean" provides both a functional/procedural and
+ "Lingua::Boolean" provides both functional/procedural and
object-oriented interfaces. Everything described below is an object
method, but can also be called as a function. "boolean()" is exported by
default, and can be called that way - everything else requires the
@@ -133,27 +133,21 @@ EXPORTS
must be fully qualified - or use the object-oriented interface.
AVAILABILITY
+ The project homepage is <http://p3rl.org/Lingua::Boolean>.
+
The latest version of this module is available from the Comprehensive
Perl Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a
CPAN site near you, or see
- <http://search.cpan.org/dist/Lingua-Boolean/>.
-
- The development version lives at
- <http://github.com/doherty/Lingua-Boolean> and may be cloned from
- <git://github.com/doherty/Lingua-Boolean.git>. Instead of sending
- patches, please fork this project using the standard git and github
- infrastructure.
+ <https://metacpan.org/module/Lingua::Boolean/>.
SOURCE
The development version is on github at
<http://github.com/doherty/Lingua-Boolean> and may be cloned from
<git://github.com/doherty/Lingua-Boolean.git>
BUGS AND LIMITATIONS
- No bugs have been reported.
-
- Please report any bugs or feature requests through the web interface at
- <https://github.com/doherty/Lingua-Boolean/issues>.
+ You can make new bug reports, and view existing ones, through the web
+ interface at <https://github.com/doherty/Lingua-Boolean/issues>.
AUTHOR
Mike Doherty <doherty@cpan.org>
View
@@ -0,0 +1,168 @@
+# NAME
+
+Lingua::Boolean - comprehensively parse boolean response strings
+
+# VERSION
+
+version 0.007
+
+# SYNOPSIS
+
+ use Lingua::Boolean;
+
+ # Use functional/procedural interface
+ print "Do it? ";
+ chomp(my $response = <>);
+ if ( boolean $response ) { # YES, y, OK, 1...
+ print "OK, doing it.\n";
+ }
+ else { # no, N, 0...
+ print "OK, not doing it.\n";
+ }
+
+ # Once more, with feeling
+ print "Fait-le? ";
+ chomp($response = <>);
+ if ( boolean $response, 'fr' ) { # OUI
+ print "OK, on le fait.\n";
+ }
+ else { # non
+ print "OK, on ne le fait pas.\n";
+ }
+
+ # Or, use OO interface
+ my $bool = Lingua::Boolean->new('en');
+ print "Do it? ";
+ chomp($response = <>);
+ if ($bool->boolean($response)) {
+ print "OK, doing it!\n";
+ }
+ else {
+ print "OK, not doing it.\n";
+ }
+
+# DESCRIPTION
+
+Does that string look like they said "true" or "false"? To know, you
+have to check a lot of things. `Lingua::Boolean` attempts to do that
+in a single module, and do so for multiple languages.
+
+# METHODS
+
+`Lingua::Boolean` provides both functional/procedural and object-oriented
+interfaces. Everything described below is an object method, but can also be
+called as a function. `boolean()` is exported by default, and can be called
+that way - everything else requires the fully-qualified name.
+
+ use Lingua::Boolean;
+ my @languages = Lingua::Boolean::languages();
+ print boolean('yes') . "\n"; # boolean is exported by default
+
+## import
+
+Calling `import()` will, obviously, import subs into your namespace.
+By default, `Lingua::Boolean` imports the sub `boolean()`. All other
+subs should be accessed with the object-oriented interface, or use
+the fully qualified name.
+
+## new
+
+`new()` creates a new `Lingua::Boolean` object. You can optionally give it
+the code for the language you'll be working with, and only that language will
+be loaded. If you do so, you needn't pass the language to every call to
+`boolean()`:
+
+ use Lingua::Boolean qw();
+ my $bool = Lingua::Boolean->new('fr');
+ print ($bool->boolean('oui') ? "TRUE\n" : "FALSE\n");
+
+Otherwise, `boolean()` accept the language code as the second parameter:
+
+ use Lingua::Boolean qw();
+ my $bool = Lingua::Boolean->new();
+ print ($bool->boolean('oui', 'fr') ? "TRUE\n" : "FALSE\n");
+
+## boolean
+
+__`boolean()`__ tries to determine if the string _looks_ true or _looks_ false, and
+returns true or false accordingly. If both tests fail, dies. By default, uses _en_; pass
+a language code as the second parameter to check another language. Croaks if the language
+is unknown to `Lingua::Boolean` (or the `Lingua::Boolean` object, if used as an object
+method).
+
+ use Lingua::Boolean qw();
+ my $bool = Lingua::Boolean->new();
+ print ($bool->boolean('yes') ? "TRUE\n" : "FALSE\n");
+
+If you specify the language in the constructor, you needn't specify it in the call to `boolean()`:
+
+ use Lingua::Boolean qw();
+ my $bool = Lingua::Boolean->new('fr');
+ print ($bool->boolean('OUI') ? "TRUE\n" : "FALSE\n");
+
+This sub is exported by default, and can be used functionally:
+
+ use Lingua::Boolean;
+ print (boolean('yes') ? "TRUE\n" : "FALSE\n");
+
+## languages
+
+`languages()` returns the list of languages that `Lingua::Boolean` knows about.
+
+ use Lingua::Boolean;
+ my @languages = Lingua::Boolean::languages(); # qw(English Français ...)
+
+When called as an object method, returns the languages that __that object__ knows
+about:
+
+ use Lingua::Boolean qw();
+ my $bool = Lingua::Boolean->new('fr');
+ my @languages = $bool->languages(); # qw(Français)
+
+## langs
+
+`langs()` returns the list of language _codes_ that `Lingua::Boolean` knows about.
+
+ use Lingua::Boolean;
+ my @lang_codes = Lingua::Boolean::langs(); # qw(en fr ...)
+
+When called as an object method, returns the languages that __that object__ knows
+about:
+
+ use Lingua::Boolean qw();
+ my $bool = Lingua::Boolean->new('fr');
+ my @lang_codes = $bool->langs(); # qw(fr)
+
+# EXPORTS
+
+By default, `Lingua::Boolean` exports `boolean()`. All other methods
+must be fully qualified - or use the object-oriented interface.
+
+# AVAILABILITY
+
+The project homepage is [http://p3rl.org/Lingua::Boolean](http://p3rl.org/Lingua::Boolean).
+
+The latest version of this module is available from the Comprehensive Perl
+Archive Network (CPAN). Visit [http://www.perl.com/CPAN/](http://www.perl.com/CPAN/) to find a CPAN
+site near you, or see [https://metacpan.org/module/Lingua::Boolean/](https://metacpan.org/module/Lingua::Boolean/).
+
+# SOURCE
+
+The development version is on github at [http://github.com/doherty/Lingua-Boolean](http://github.com/doherty/Lingua-Boolean)
+and may be cloned from [git://github.com/doherty/Lingua-Boolean.git](git://github.com/doherty/Lingua-Boolean.git)
+
+# BUGS AND LIMITATIONS
+
+You can make new bug reports, and view existing ones, through the
+web interface at [https://github.com/doherty/Lingua-Boolean/issues](https://github.com/doherty/Lingua-Boolean/issues).
+
+# AUTHOR
+
+Mike Doherty <doherty@cpan.org>
+
+# COPYRIGHT AND LICENSE
+
+This software is copyright (c) 2010 by Mike Doherty.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.

0 comments on commit c55f2d9

Please sign in to comment.