NAME
Net::Stomp::MooseHelpers::TracerRole - role to dump Net::Stomp frames to disk
VERSION
version 1.4
DESCRIPTION
This role is not to be used directly, look at Net::Stomp::MooseHelpers::TraceStomp and Net::Stomp::MooseHelpers::TraceOnly.
This role provides attributes and methods to write to disk every outgoing and incoming STOMP frame.
The frames are written as they are "on the wire" (no encoding conversion happens), one file per frame. Each frame is written into a directory under "trace_basedir" with a name derived from the frame destination.
ATTRIBUTES
trace_basedir
The directory under which frames will be dumped. Accepts strings and Path::Class::Dir objects. If it's not specified and you enable "trace", every frame will generate a warning.
trace
Boolean attribute to enable or disable tracing / dumping of frames. If you enable tracing but don't set "trace_basedir", every frame will generate a warning.
METHODS
_dirname_from_destination
Generate a directory name from a frame destination. By default, replaces every sequence of non-word characters with '_'
.
_filename_from_frame
Returns a filehandle / filename pair for the file to write the frame into. Avoids duplicates by using Time::HiRes's time
as a starting filename, and File::Temp.
AUTHOR
Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Net-a-porter.com.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.