Acme-Insult-Glax

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

    organization, to others outside of your company or organization.

    "Distributor Fee" means any fee that you charge for Distributing
    this Package or providing support for this Package to another
    party.  It does not mean licensing fees.

    "Standard Version" refers to the Package if it has not been
    modified, or has been modified only in ways explicitly requested
    by the Copyright Holder.

    "Modified Version" means the Package, if it has been changed, and
    such changes were not explicitly requested by the Copyright
    Holder.

    "Original License" means this Artistic License as Distributed with
    the Standard Version of the Package, in its current version or as
    it may be modified by The Perl Foundation in the future.

    "Source" form means the source code, documentation source, and
    configuration files for the Package.

    "Compiled" form means the compiled bytecode, object code, binary,

LICENSE  view on Meta::CPAN


Permissions for Redistribution of the Standard Version

(2)  You may Distribute verbatim copies of the Source form of the
Standard Version of this Package in any medium without restriction,
either gratis or for a Distributor Fee, provided that you duplicate
all of the original copyright notices and associated disclaimers.  At
your discretion, such verbatim copies may or may not include a
Compiled form of the Package.

(3)  You may apply any bug fixes, portability changes, and other
modifications made available from the Copyright Holder.  The resulting
Package will still be considered the Standard Version, and as such
will be subject to the Original License.


Distribution of Modified Versions of the Package as Source

(4)  You may Distribute your Modified Version as Source (either gratis
or for a Distributor Fee, and with or without a Compiled form of the
Modified Version) provided that you clearly document how it differs

README.md  view on Meta::CPAN

    - `<animal_part>`
    - `<noun>`
    - `<verb>`

        Inserts an action or activity.

    Be aware that some of these are unsupported when the language is set to `en_corporate`.

- `who`

    Person to insult. If present, changes the template to third person singular.

- `plural`

    If present (along with a `who` value), changes the template to third person plural.

## `adjective( [...] )`

```perl
my $adjective0 = adjective( );
my $adjective1 = adjective( 'en' );
my $adjective2 = adjective( 'en_corporate' );
```

Generates a single descriptive adjective in plain text.

lib/Acme/Insult/Glax.pm  view on Meta::CPAN

=item C<E<lt>verbE<gt>>

Inserts an action or activity.

=back

Be aware that some of these are unsupported when the language is set to C<en_corporate>.

=item C<who>

Person to insult. If present, changes the template to third person singular.

=item C<plural>

If present (along with a C<who> value), changes the template to third person plural.

=back

=head2 C<adjective( [...] )>

    my $adjective0 = adjective( );
    my $adjective1 = adjective( 'en' );
    my $adjective2 = adjective( 'en_corporate' );

Generates a single descriptive adjective in plain text.

t/00_compile.t  view on Meta::CPAN

    isa_ok $adjective, ['Acme::Insult::Glax'], 'adjective is a *blessed* hash';
    $adjective->{insult} = 'Just a test';
    is $adjective,           'Just a test', 'stringify';
    is adjective('garbage'), U(),           'fail to generate random garbage lang adjective';
};
subtest 'insult' => sub {
    is insult(), D(), 'totally random';
    is my $adjective = insult(), hash {
        field args => hash {
            field lang => string 'en';
            field template => D()    # template subject to change
        };
        field error  => F();
        field insult => D();
    }, 'insult is a hash';
    isa_ok $adjective, ['Acme::Insult::Glax'], 'insult is a *blessed* hash';
    $adjective->{insult} = 'Just a test';
    is $adjective, 'Just a test', 'stringify';
    like insult( who => 'Alex' ),                               qr[^Alex is],                   'provide a name';
    like insult( who => 'Peter, Paul, and Mary', plural => 1 ), qr[^Peter, Paul, and Mary are], 'plural';
    is insult( lang => 'en' ),           D(), 'english';



( run in 0.375 second using v1.01-cache-2.11-cpan-5dc5da66d9d )