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

NAME

Zing::Meta - Process Metadata

ABSTRACT

Generic Process Metadata

SYNOPSIS

  use Zing::Meta;

  my $meta = Zing::Meta->new(name => rand);

  # $meta->recv;

DESCRIPTION

This package provides process metadata for tracking active processes.

INHERITS

This package inherits behaviors from:

Zing::KeyVal

LIBRARIES

This package uses type constraints from:

Zing::Types

ATTRIBUTES

This package has the following attributes:

name

  name(Str)

This attribute is read-only, accepts (Str) values, and is optional.

METHODS

This package implements the following methods:

drop

  drop() : Int

The drop method returns truthy if the process metadata can be dropped.

drop example #1
  # given: synopsis

  $meta->drop;

recv

  recv() : Maybe[HashRef]

The recv method fetches the process metadata (if any).

recv example #1
  # given: synopsis

  $meta->recv;
recv example #2
  # given: synopsis

  use Zing::Process;

  $meta->send(Zing::Process->new->metadata);

  $meta->recv;

send

  send(HashRef $proc) : Str

The send method commits the metadata provided to the store overwriting any existing data.

send example #1
  # given: synopsis

  $meta->send({ created => time });
send example #2
  # given: synopsis

  use Zing::Process;

  $meta->drop;

  $meta->send(Zing::Process->new->metadata);

term

  term(Str @keys) : Str

The term method generates a term (safe string) for the metadata.

term example #1
  # given: synopsis

  $meta->term;

AUTHOR

Al Newkirk, awncorp@cpan.org

LICENSE

Copyright (C) 2011-2019, Al Newkirk, et al.

This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".

PROJECT

Wiki

Project

Initiatives

Milestones

Contributing

Issues