← All languages

wildling

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

Example

Install

From this repository:

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

From a release tag:

git clone --branch v2.0.0 --depth 1 https://github.com/dotmonk/wildling.git
cd wildling
./build.sh perl
use lib './lib';
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.

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.