| Markdent documentation | Contained in the Markdent distribution. |
Markdent::Handler::CaptureEvents - Captures events for replaying later
version 0.17
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.
This class provides the following methods:
This method creates a new handler.
Returns a Markdent::CapturedEvents object containing all the events seen by this handler so far.
This class does the Markdent::Role::Handler role.
See Markdent for bug reporting details.
Dave Rolsky <autarch@urth.org>
This software is copyright (c) 2010 by Dave Rolsky.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
| 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__