Devel::Events::Filter::Size - Add Devel::Size info to event data.
my $f = Devel::Events::Filter::Size->new( handler => $h, fields => [qw/foo bar gorch/], # calculate the size of these fields ); # OR my $f = Devel::Events::Filter::Size->new( handler => $h, fields => "object", # just one field );
Typical usage would be to apply it to the
object field in conjunction with Devel::Events::Objects.
The fields whose size to check.
Can be a single string, or an array reference.
When undefined all fields will be computed.
This parameter controls the placement of the results (top level, or under the
It defaults to true when
fields is a scalar, and false in any other situation.
When true, "total_size" in Devel::Size will not be used.
Defaults to false.
When true, Devel::Size::Report will not be used.
Defaults to true.
is_one_field returns a true value, this method will add a
size, and optionally a
size_report field to the event. Otherwise it will add several of these to the
sizes field, keyed by the
refaddr of the value.
Only reference types will have their sizes computed.
Internal method. Used by
Returns the fields whose sizes need computing. This is either all fields if
fields is undef, or the specified fields.
Returns only one field. Used when
is_one_field is true.
Return an entry with the
Optionally uses "total_size" in Devel::Size, depending on the value of
Yuval Kogman <email@example.com>
Copyright (c) 2007 Yuval Kogman. All rights reserved This program is free software; you can redistribute it and/or modify it under the terms of the MIT license or the same terms as Perl itself.