wildling

Perl library and CLI for pattern-based string generation. Zero CPAN dependencies (core Perl only — hand-rolled JSON). Requires Perl 5.14+.

Docs: Website · Sandbox · Syntax · Source

Registry: CPAN

Example

http://${'dev,stage,prod'}\-${'api,web'}#{0-2}.example.${'com,net,org'}/@.html

(The \- is a literal hyphen; bare - would mean “one letter or digit”. @ is one lowercase letter.)

That builds URL-shaped candidates: scheme http://, then environment × service × optional digits × TLD, then a one-letter path page. Three environments, two services, zero–two digits ('', 09, 0099), three TLDs, and az51948 strings — the kind of list you generate for fuzzing links or probing staging hosts, not type out.

A few of them:

Named dictionaries (%{'hosts'}) work the same way when the word lists live in files.

Try it in the sandbox, or see pattern syntax for length ranges, dictionaries, and escapes.

Install

Registry (CPAN):

cpanm Wildling
# or: cpan Wildling

The CPAN distribution is named Wildling (PAUSE requires an uppercase package name).

From this repository:

cd perl
./build.sh
./bin/wildling "Year 19##"
use Wildling;

my $wildling = Wildling::create(['Year 19##']);
while (defined(my $value = $wildling->next())) {
    print "$value\n";
}
# get()/next() return undef when out of range (not the string "false").
# Empty combinations are defined "" — distinct from the sentinel.

From a release tag:

git clone --branch v2.0.7 --depth 1 https://github.com/dotmonk/wildling.git
cd wildling
./build.sh perl

CLI

./bin/wildling "Year 19##"
./bin/wildling --dictionary planets:../dictionaries/planets.txt "%{'planets'}"
./bin/wildling --template ./config.json

Help text and --check output follow docs/cli.md / docs/help.txt.

Build

./build.sh   # Docker (python:3.13-alpine + perl): copy help.txt + perl -c syntax check

Project tests live in ../tests/ and are run with ../test.sh.