Class-Load-XS

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

  anyway. Reported by Father Chrysostomos. RT #80002.

- Weird classes with either an ISA or VERSION constant (who does that?) would
  cause the XS to blow up badly. Reported by Father Chrysostomos. RT #79998.

0.04     2012-02-08
- Some small test changes for the latest Module::Implementation and
  Class::Load. There is no need to upgade if you have 0.03 installed.

0.03     2011-11-18
- Explicitly include Test::Fatal as a test prereq. Reported by W Phillip
  Moore. RT #72493.

0.02     2011-10-08
- Require the latest Class::Load (0.11).

0.01     2011-08-15
- First release upon an unsuspecting world.

META.json  view on Meta::CPAN

         }
      },
      "test" : {
         "recommends" : {
            "CPAN::Meta" : "2.120900"
         },
         "requires" : {
            "ExtUtils::MakeMaker" : "0",
            "File::Spec" : "0",
            "Module::Implementation" : "0.04",
            "Test::Fatal" : "0",
            "Test::More" : "0.88",
            "Test::Needs" : "0",
            "constant" : "0",
            "lib" : "0",
            "perl" : "5.006",
            "version" : "0"
         }
      }
   },
   "provides" : {

META.yml  view on Meta::CPAN

---
abstract: 'XS implementation of parts of Class::Load'
author:
  - 'Dave Rolsky <autarch@urth.org>'
build_requires:
  ExtUtils::MakeMaker: '0'
  File::Spec: '0'
  Module::Implementation: '0.04'
  Test::Fatal: '0'
  Test::More: '0.88'
  Test::Needs: '0'
  constant: '0'
  lib: '0'
  perl: '5.006'
  version: '0'
configure_requires:
  ExtUtils::MakeMaker: '0'
  perl: '5.006'
dynamic_config: 0

Makefile.PL  view on Meta::CPAN

  "PREREQ_PM" => {
    "Class::Load" => "0.20",
    "XSLoader" => 0,
    "strict" => 0,
    "warnings" => 0
  },
  "TEST_REQUIRES" => {
    "ExtUtils::MakeMaker" => 0,
    "File::Spec" => 0,
    "Module::Implementation" => "0.04",
    "Test::Fatal" => 0,
    "Test::More" => "0.88",
    "Test::Needs" => 0,
    "constant" => 0,
    "lib" => 0,
    "version" => 0
  },
  "VERSION" => "0.10",
  "test" => {
    "TESTS" => "t/*.t"
  }
);


my %FallbackPrereqs = (
  "Class::Load" => "0.20",
  "ExtUtils::MakeMaker" => 0,
  "File::Spec" => 0,
  "Module::Implementation" => "0.04",
  "Test::Fatal" => 0,
  "Test::More" => "0.88",
  "Test::Needs" => 0,
  "XSLoader" => 0,
  "constant" => 0,
  "lib" => 0,
  "strict" => 0,
  "version" => 0,
  "warnings" => 0
);

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

                                    }
                    },
       'test' => {
                   'recommends' => {
                                     'CPAN::Meta' => '2.120900'
                                   },
                   'requires' => {
                                   'ExtUtils::MakeMaker' => '0',
                                   'File::Spec' => '0',
                                   'Module::Implementation' => '0.04',
                                   'Test::Fatal' => '0',
                                   'Test::More' => '0.88',
                                   'Test::Needs' => '0',
                                   'constant' => '0',
                                   'lib' => '0',
                                   'perl' => '5.006',
                                   'version' => '0'
                                 }
                 }
     };
  $x;

t/003-load-class.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More 0.88;
use lib 't/lib';
use Test::Class::Load ':all';
use Test::Fatal;

is( load_class('Class::Load::OK'), 'Class::Load::OK', 'loaded class OK' );
is( $Class::Load::ERROR, undef, 'ERROR is undef' );

like(
    exception {
        load_class('Class::Load::Nonexistent');
    },
    qr{^Can't locate Class/Load/Nonexistent.pm in \@INC},
    'threw exception for nonexistent class'

t/004-load-double.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More 0.88;
use lib 't/lib';
use Test::Class::Load ':all';
use Test::Fatal;

# This test does 2 things.
# Firstly, confirm that on 5.8, load_class will
# still throw an exception , even if its been loaded before:
#
#    eval { require Foo; }; require Foo; # doesn't error on 5.8
#
# Secondly, to ensure errors thrown are useful.
# ( As without the code in load_class to delete $INC{file}
#    it will just die with "COMPILATION ERROR", which is

t/005-load-optional.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More 0.88;
use Test::Fatal;
use lib 't/lib';
use Test::Class::Load qw( :all );

is(
  exception {
    load_optional_class('Class::Load::OK');
  },
  undef,
  'No failure loading a good class'
);

t/007-first-existing.t  view on Meta::CPAN

use strict;
use warnings;
use Test::Fatal;
use Test::More 0.88;
use lib 't/lib';
use Test::Class::Load 'load_first_existing_class';

is(
    load_first_existing_class(
        'Class::Load::Nonexistent', 'Class::Load::OK'
    ),
    'Class::Load::OK',
    'load_first_existing_class ignore nonexistent class'

t/008-gvstash-bug.t  view on Meta::CPAN

use strict;
use warnings;
use Test::Fatal;
use Test::More 0.88;
use lib 't/lib';
use Test::Class::Load 'load_class';

is( exception {
    load_class('Class::Load::Stash::Sub');
}, undef, 'Loaded Class::Load::Stash::Sub' );

Class::Load::Stash->can('a_method');

t/009-invalid-module-name.t  view on Meta::CPAN

use strict;
use warnings;
use Test::Fatal;
use Test::More 0.88;
use lib 't/lib';
use Test::Class::Load 'load_class';

my @bad = qw(
    Foo:Bar
    123
    Foo::..::..::tmp::bad.pl
    ::..::tmp::bad
    ''tmp

t/010-isa-false-positive.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More 0.88;
use Test::Fatal;

use lib 't/lib';
use Test::Class::Load 'load_optional_class';

isnt(
    exception {
        load_optional_class('Class::Load::Error::DieAfterIsa');
    },
    undef,
    'Class which calls die is reported as an error'

t/012-without-implementation.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More 0.88;
use Test::Fatal;

use Test::Needs 'Test::Without::Module';

Test::Without::Module->import(qw( Class::Load::PP Class::Load::XS ));

{
    like(
        exception { require Class::Load },
        qr!Can't locate Class.Load.PP\.pm in \@INC|Class.Load.PP\.pm did not return a true value!,
        'error when loading Class::Load and no implementation is available includes errors from trying to load modules'

t/014-weird-constants.t  view on Meta::CPAN

use strict;
use warnings;

use Test::Fatal;
use Test::More 0.88;

use lib 't/lib';
use Test::Class::Load ':all';

{
    package ConstantISA;

    use constant ISA => 1;
}



( run in 1.635 second using v1.01-cache-2.11-cpan-54e63673c56 )