The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

fun.thinge

Provides generalized functions for saving, recalling, and tagging links, funny cat pictures, quotes, or practically anything else that can be put into a chat message.

The type of a thinge is arbitrary, and whenever a new thinge is added with a type that is not yet known, that type is created automatically.

thinge

Description

Returns a specific thinge (when the ``id`` is given), a random thinge with a particular tag (when ``tag`` is given), or a random thinge of ``type`` from the collection (when only ``type`` is provided).

Usage

<type> [<id> | <tag>]

thinge-find

Description

Searches through the thinges of a given type for any containing ``pattern``. Patterns may be simple strings or regular expressions.

Usage

<type> <pattern>

thinge-add

Description

Saves a thinge to the collection and reports its ID. If there is no ``type`` yet, it is created automatically and a new ID sequence is started for it.

Usage

<type> <text>

thinge-counts

Description

Returns a map of thinges, where the keys are each thinge type's name and the value is how many are in that thinge's collection for the current network.

thinge-delete

Description

Removes the specified thinge from the collection.

Usage

<type> <id>

thinge-tag

Description

Tags the specified thinge with the given list of tags. Tags will also start with a ``#`` character - if you don't supply it, it will be added automatically before saving the tag.

Usage

<type> <id> <tag> [<tag> ...]

thinge-types

Description

Lists the current types of thinges which have collections.

Description

Like ``(thinge-find)``, will search through the type of thinges specified, but unlike find this function returns a summary of multiple matches. The ``limit`` argument may be used to change the number of matches shown (10 by default).

Search patterns are unanchored, case-insensitive regular expressions.

Usage

<type> <pattern> [<limit>]