Markdent::Handler::CaptureEvents - Captures events for replaying later


Markdent documentation Contained in the Markdent distribution.

Index


Code Index:

NAME

Top

Markdent::Handler::CaptureEvents - Captures events for replaying later

VERSION

Top

version 0.17

DESCRIPTION

Top

This class implements an event receiver which simply captures events using Markdent::CapturedEvents. This can be used as a way to cache the results of parsing at an intermediate stage.

METHODS

Top

This class provides the following methods:

Markdent::Handler::CapturedEvents->new()

This method creates a new handler.

$mhce->captured_events()

Returns a Markdent::CapturedEvents object containing all the events seen by this handler so far.

ROLES

Top

This class does the Markdent::Role::Handler role.

BUGS

Top

See Markdent for bug reporting details.

AUTHOR

Top

Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE

Top


Markdent documentation Contained in the Markdent distribution.

package Markdent::Handler::CaptureEvents;
BEGIN {
  $Markdent::Handler::CaptureEvents::VERSION = '0.17';
}

use strict;
use warnings;

use Markdent::CapturedEvents;

use namespace::autoclean;
use Moose;
use MooseX::StrictConstructor;

with 'Markdent::Role::Handler';

has captured_events => (
    is       => 'ro',
    isa      => 'Markdent::CapturedEvents',
    init_arg => undef,
    default => sub { Markdent::CapturedEvents->new() },
);

sub handle_event {
    $_[0]->captured_events()->capture_events( $_[1] );
}

__PACKAGE__->meta()->make_immutable();

1;

# ABSTRACT: Captures events for replaying later




__END__