Acme-Insult-Glax
view release on metacpan or search on metacpan
[](https://github.com/sanko/Acme-Insult-Glax/actions) [](https://metacpan.org/release/Acm...
# NAME
Acme::Insult::Glax - Programmatically Generate Insults
# SYNOPSIS
```perl
use Acme::Insult::Glax qw[insult];
say insult( );
```
# DESCRIPTION
Acme::Insult::Glax provides 'insulting' statements generated by the RESTful libInsult API.
# METHODS
These functions may be imported by name or with the `:all` tag.
## `insult( [...] )`
Tear someone down.
```perl
my $shade = insult( ); # Random insult
print insult( lang => 'en_corporate', who => 'John and Eric', plural => 1 );
print insult( lang => 'en_corporate', who => 'John' );
print insult( lang => 'en_corporate', who => 'John' );
```
You may request specific insults by passing parameters.
Expected parameters include:
- `lang`
Insult's language style. Expected styles include:
- `en`
Plain English. This is the default.
- `en_corporate`
English with corporate jargon inserted. Perfect for the 4:50p work email.
- `template`
Insult template.
The default value is different depending on the parameters passed to the API:
- `lang => 'en'`
```
You are as <adjective> as <article target=adj1> <adjective min=1 max=3 id=adj1> <amount> of <adjective min=1 max=3> <animal> <animal_part>
```
- `lang => 'en', who => 'Alex'`
```
Alex is as <adjective> as <article target=adj1> <adjective min=1 max=3 id=adj1> <amount> of <adjective min=1 max=3> <animal> <animal_part>
```
- `lang => 'en', plural => 1`
```
You are as <adjective> as <article target=adj1> <adjective min=1 max=3 id=adj1> <amount> of <adjective min=1 max=3> <animal> <animal_part>
```
( run in 3.334 seconds using v1.01-cache-2.11-cpan-54e63673c56 )