pperl-specific diagnostics#

Messages PetaPerl emits that have no counterpart in upstream Perl. Most concern the daemon mode - pperl’s persistent-process feature, which has no analogue in a stock perl - and a few native modules with pperl-specific behavior.

Daemon mode#

pperl can run a script as a resident daemon and dispatch requests to it, which avoids paying interpreter startup on every call. The daemon diagnostics report problems with that channel.

`Daemon already running for this script (socket: %s)`#

(F)

A --daemon start was requested for a script that already has a running daemon. The socket path is shown. Stop the existing daemon first, or connect to it instead of starting a new one.

`Cannot connect to daemon (%s): %s`#

(F)

A client could not reach the daemon socket. The message continues with one of two hints depending on context - Start with: pperl --daemon <script> when no daemon appears to be running, or Is the daemon running? when the socket exists but the connection failed. Start the daemon, or check that the socket path matches.

Native modules#

`ERRNO hash is read only!`#

(F)

Code tried to assign to %! (the Errno symbolic-error hash) or to one of its keys. That hash is populated by the runtime and reflects the current errno; it is not writable. Read it ($!{ENOENT}) rather than assigning to it.

`Hash has key '%s' which is not in the new key set`#

(F)

From Hash::Util: a lock_keys call supplied an explicit key set that does not include a key the hash already contains. Locking cannot proceed because that existing key would become inaccessible. Either include the existing key in the new set, or delete it before locking.

`Time::HiRes::usleep(%s): negative time not invented yet`#

(F)

A Time::HiRes sleep function was given a negative duration. Time runs forward; pass a non-negative number of microseconds (or nanoseconds for nanosleep). The nanosleep form reports the same with its own name.

`%s version %s required--this is only version %s`#

(F)

A use Module VERSION (or an explicit version check) demanded a newer version of a module than the one installed. The message names the module, the version requested, and the version present. Install or load the required version.

See also#

  • Internal errors - the panics that mean a pperl bug rather than a usage error.

  • Disclaimer & bug reports - how pperl diverges from stock perl, and where to report problems.

  • Errno - the module behind %!, the read-only symbolic-errno hash.

  • Hash::Util - lock_keys and the restricted-hash machinery.