NAME

Zing::Zang::Watcher - Watcher Process

ABSTRACT

Watcher Process Implementation

SYNOPSIS

  use Zing::Zang::Watcher;

  my $zang = Zing::Zang::Watcher->new(
    on_perform => sub {
      my ($self) = @_;

      $self->{performed}++
    },
    scheme => ['MyApp', [], 1],
  );

  # $zang->execute;

DESCRIPTION

This package provides a Zing::Watcher which uses callbacks and doesn't need to be subclassd. It supports providing a process perform method as on_perform and a receive method as on_receive which operate as expected, and also requires a scheme to be launched on execution.

INHERITS

This package inherits behaviors from:

Zing::Watcher

LIBRARIES

This package uses type constraints from:

Zing::Types

ATTRIBUTES

This package has the following attributes:

on_perform

  on_perform(Maybe[CodeRef])

This attribute is read-only, accepts (Maybe[CodeRef]) values, and is optional.

on_receive

  on_receive(Maybe[CodeRef])

This attribute is read-only, accepts (Maybe[CodeRef]) values, and is optional.

scheme

  scheme(Scheme)

This attribute is read-only, accepts (Scheme) values, and is required.

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