Devel-Gladiator

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Devel-Gladiator

0.08    2020-06-11 17:42:46Z
        - fix sample code snippet for spotting new arena entries (mohawk,
          PR#2)

0.07    2014-10-19 18:26:32Z
        - skip failing PadWalker tests on < 5.009 (RT#99581)

0.06    2014-10-19 01:49:27Z
        - documentation updates (thanks, mohawk!)

0.05    20142014-10-18 06:51:53Z
        - minor documentation updates
        - converted packaging to Dist::Zilla; declared correct prerequisites
        - updated ppport.h to latest version

0.04    2013-05-14

META.json  view on Meta::CPAN

         "recommends" : {
            "Dist::Zilla::PluginBundle::Author::ETHER" : "0.158",
            "Dist::Zilla::PluginBundle::Git::VersionManager" : "0.007"
         },
         "requires" : {
            "Devel::PPPort" : "3.23",
            "Encode" : "0",
            "File::Spec" : "0",
            "IO::Handle" : "0",
            "IPC::Open3" : "0",
            "PadWalker" : "0",
            "Pod::Coverage::TrustPod" : "0",
            "Pod::Wordlist" : "0",
            "Test::CPAN::Changes" : "0.19",
            "Test::CPAN::Meta" : "0",
            "Test::CleanNamespaces" : "0.15",
            "Test::EOL" : "0",
            "Test::Kwalitee" : "1.21",
            "Test::MinimumVersion" : "0",
            "Test::Mojibake" : "0",
            "Test::More" : "0.96",

META.json  view on Meta::CPAN

         },
         "requires" : {
            "Devel::Peek" : "0",
            "ExtUtils::MakeMaker" : "0",
            "File::Spec" : "0",
            "Scalar::Util" : "0",
            "Test::More" : "0",
            "perl" : "5.006"
         },
         "suggests" : {
            "PadWalker" : "0"
         }
      },
      "x_Dist_Zilla" : {
         "requires" : {
            "Dist::Zilla" : "5",
            "Dist::Zilla::Plugin::Authority" : "1.009",
            "Dist::Zilla::Plugin::AutoMetaResources" : "0",
            "Dist::Zilla::Plugin::AutoPrereqs" : "5.038",
            "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : "0.004",
            "Dist::Zilla::Plugin::CheckIssues" : "0",

META.json  view on Meta::CPAN

            "version" : "0.024"
         },
         {
            "class" : "Dist::Zilla::Plugin::Prereqs::Soften",
            "config" : {
               "Dist::Zilla::Plugin::Prereqs::Soften" : {
                  "copy_to" : [
                     "develop.requires"
                  ],
                  "modules" : [
                     "PadWalker"
                  ],
                  "modules_from_features" : null,
                  "to_relationship" : "suggests"
               }
            },
            "name" : "Prereqs::Soften",
            "version" : "0.006003"
         },
         {
            "class" : "Dist::Zilla::Plugin::FinderCode",

META.yml  view on Meta::CPAN

          starting_version: '5.007003'
      name: OnlyCorePrereqs
      version: '0.024'
    -
      class: Dist::Zilla::Plugin::Prereqs::Soften
      config:
        Dist::Zilla::Plugin::Prereqs::Soften:
          copy_to:
            - develop.requires
          modules:
            - PadWalker
          modules_from_features: ~
          to_relationship: suggests
      name: Prereqs::Soften
      version: '0.006003'
    -
      class: Dist::Zilla::Plugin::FinderCode
      name: ':InstallModules'
      version: '6.015'
    -
      class: Dist::Zilla::Plugin::FinderCode

dist.ini  view on Meta::CPAN

changes_version_columns = 8
authority = cpan:NUFFIN
Test::MinimumVersion.max_target_perl = 5.006
Git::GatherDir.exclude_match = ^inc/
Test::ReportPrereqs.include = DynaLoader

[OnlyCorePrereqs]
starting_version = 5.007003  ;  Scalar::Util

[Prereqs::Soften]
module = PadWalker
copy_to = develop.requires
to_relationship = suggests

lib/Devel/Gladiator.pm  view on Meta::CPAN


This is a convenient way to find out how many objects of a given class exist at
a certain point.

=head2 arena_table

Formats a string table based on C<arena_ref_counts> suitable for printing.

=head1 LIMITATIONS

This code may not work on perls 5.6.x and 5.8.x if L<PadWalker> is installed.
(Patches gratefully accepted!)

=head1 SEE ALSO

=over 4

=item *

L<Become a hero plumber|http://blog.woobling.org/2009/05/become-hero-plumber.html>

t/00-report-prereqs.dd  view on Meta::CPAN

                      'recommends' => {
                                        'Dist::Zilla::PluginBundle::Author::ETHER' => '0.158',
                                        'Dist::Zilla::PluginBundle::Git::VersionManager' => '0.007'
                                      },
                      'requires' => {
                                      'Devel::PPPort' => '3.23',
                                      'Encode' => '0',
                                      'File::Spec' => '0',
                                      'IO::Handle' => '0',
                                      'IPC::Open3' => '0',
                                      'PadWalker' => '0',
                                      'Pod::Coverage::TrustPod' => '0',
                                      'Pod::Wordlist' => '0',
                                      'Test::CPAN::Changes' => '0.19',
                                      'Test::CPAN::Meta' => '0',
                                      'Test::CleanNamespaces' => '0.15',
                                      'Test::EOL' => '0',
                                      'Test::Kwalitee' => '1.21',
                                      'Test::MinimumVersion' => '0',
                                      'Test::Mojibake' => '0',
                                      'Test::More' => '0.96',

t/00-report-prereqs.dd  view on Meta::CPAN

                                   },
                   'requires' => {
                                   'Devel::Peek' => '0',
                                   'ExtUtils::MakeMaker' => '0',
                                   'File::Spec' => '0',
                                   'Scalar::Util' => '0',
                                   'Test::More' => '0',
                                   'perl' => '5.006'
                                 },
                   'suggests' => {
                                   'PadWalker' => '0'
                                 }
                 },
       'x_Dist_Zilla' => {
                           'requires' => {
                                           'Dist::Zilla' => '5',
                                           'Dist::Zilla::Plugin::Authority' => '1.009',
                                           'Dist::Zilla::Plugin::AutoMetaResources' => '0',
                                           'Dist::Zilla::Plugin::AutoPrereqs' => '5.038',
                                           'Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional' => '0.004',
                                           'Dist::Zilla::Plugin::CheckIssues' => '0',

t/padwalker.t  view on Meta::CPAN

use strict;
use warnings;

# this module runs if padwalker is installed
# it tests getting data through padwalker that is has found on the arena

use Test::More;
use Devel::Peek;

if ("$]" < '5.009') {
    plan skip_all => "Tests with PadWalker do not pass on 5.8.x - patches welcome";
}
if (!eval { require PadWalker; 1 }) {
    plan skip_all => "No PadWalker installed";
}

plan tests => 5;
use Devel::Gladiator;

{
    my $outer = "outer";
    my %bar;
    $bar{baz} = "baz";
    sub blah {

t/padwalker.t  view on Meta::CPAN

        return bless sub { $foo . $bar . $outer . $bar{baz}} , "Dummy";
    }
}

my $sub1 = blah();

{
    my $array = Devel::Gladiator::walk_arena();
    foreach my $value (@$array) {
        next unless ref ($value) eq 'Dummy';
        my $peek_sub = PadWalker::peek_sub($value);

        is(${$peek_sub->{'$foo'}}, "foo");
        is(${$peek_sub->{'$outer'}}, "outer"); # used to be testing for 'undef', but it's a closure var, should be refcnt = 2 (one in Dummy, one in sub blah)
        is(${$peek_sub->{'$bar'}}, "bar");
        is($peek_sub->{'%bar'}->{baz}, "baz");
        is($peek_sub->{'%bar'}->{foz}, "foz");


        last;
    }



( run in 0.847 second using v1.01-cache-2.11-cpan-05444aca049 )