CLASS-v1.1.8/0000755000175100000240000000000014503541171011702 5ustar jackdialoutCLASS-v1.1.8/Changes0000644000175100000240000000317214503540400013172 0ustar jackdialoutRevision history for Perl module Class v1.1.8 2023-09-23T19:16:58+0900 - Correcting an issue with the signature file of this release. Bug #1 v1.1.6 2022-03-06T19:27:08+0900 - Correcting module name v1.1.5 2022-03-06T12:12:37+0900 - Amending distribution to revert to CLASS v1.1.4 2022-03-05T18:29:07+0900 - Improed nheritance and adjusted unit tests v1.1.3 2022-03-05T14:55:20+0900 - Added missing inheritance of @EXPORT, @EXPORT_OK and %EXPORT_TAGS - Made Class::* modules independent from Module::Generic v1.1.2 2022-02-28T07:14:12+0900 - Resubmission due to error on CPAN v1.1.1 2022-02-27T17:18:25+0900 - Transfer of Class to Jacques Deguest - Adding Class::Array and Class::Scalar after transfer from Dan Kogai - Added modules Class::Array, Class::Boolean, Class::Exception, Class::File, Class::Finfo, Class::Assoc, Class::Null, Class::Class::Number, Class::Scalar 1.00 2006-10-09T18:10:58-0700 - Add a LICENSE notice - This is 1.00, why not - Remove the really, really old Test::More bundled with this and just depend on it instead. 0.91 2003-05-20T01:23:08-0700 - CLASS is now a real constant (thanks Juerd) 0.90 2002-11-29T14:26:09-0700 - Colm figured out a way to add $CLASS - Cut out using any other modules so load time is now negligible. - This pretty much makes the module Feature Complete so jacking up to 0.90 as a beta release. 0.03 2001-08-28T01:32:07-0400 - Eliminated nearly ALL the code! - Explicitly tested all the way back to 5.004 0.02 2001-08-24T23:34:51-0400 - Added CLASS keyword 0.01 2001-06-28T13:14:31-0400 - First working version. CLASS-v1.1.8/CONTRIBUTING.md0000644000175100000240000000360614503540016014135 0ustar jackdialout## How to contribute Thank you for considering contributing to this distribution. I welcome any contribution to CLASS, including, but not limited to bug reports, feature requests, general comments, and patches. Feel free to clone it from its gitlab repository at and issue a pull request. I am very flexible to collaboration and always eager to learn from others. All contributions are assumed to be provided under the terms of [perl5 license](http://dev.perl.org/licenses/). ### Issues File [an issue on bug tracker](https://github.com/jackdeguest/CLASS/issues) if you think you've found a bug. Please describe 1. How can it be reproduced 1. What was expected 1. What actually occurred 1. What version of the involved component ## Coding Style I personally stick to the [Allman](https://en.wikipedia.org/wiki/Indentation_style#Allman_style) coding style. If you want to provide a patch to an existing piece of code, for clarity and consistency, it is best to stick to the existing coding style, whatever that may be. However, if you want to contribute a new module, you should feel free to use your coding style with comments to ensure readability and clarity. Otherwise, I think it is reasonable to heed to [perl style recommendations](https://metacpan.org/pod/perlstyle). ## Versioning The versioning style used is dotted decimal, such as `v0.1.1` Please see [version](https://metacpan.org/pod/version) for more information. ## How to contact the author You can reach me via e-mail , or via [Telegram](https://t.me/jackdeguest), or [LinkedIn](https://www.linkedin.com/in/jackdeguest/) ## Issue Tracking Issues are currently reported using CPAN [bug tracker](https://github.com/jackdeguest/CLASS/issues) ## More information Please refer to the [README](https://metacpan.org/source/JDEGUEST/CLASS-v1.1.7/README.md) ## Author Jacques Deguest CLASS-v1.1.8/lib/0000755000175100000240000000000014503541170012447 5ustar jackdialoutCLASS-v1.1.8/lib/CLASS.pm0000644000175100000240000000300614503540265013655 0ustar jackdialoutpackage CLASS; use 5.004; $VERSION = 'v1.1.8'; BEGIN { # Faster than 'use constant'. Load time critical. # Must eval to make $] constant. *PERL_VERSION = eval qq{ sub () { $] } }; } sub import { my $caller = caller; *{$caller.'::CLASS'} = \$caller; # This logic is compiled out. if( PERL_VERSION >= 5.008 ) { # 5.8.x smart enough to make this a constant. *{$caller.'::CLASS'} = sub () { $caller }; } else { # Make CLASS a constant. *{$caller.'::CLASS'} = eval qq{ sub () { q{$caller} } }; } } =head1 NAME CLASS - Alias for __PACKAGE__ =head1 SYNOPSIS package Foo; use CLASS; print CLASS; # Foo print "My class is $CLASS\n"; # My class is Foo sub bar { 23 } print CLASS->bar; # 23 print $CLASS->bar; # 23 =head1 DESCRIPTION CLASS and $CLASS are both synonyms for __PACKAGE__. Easier to type. $CLASS has the additional benefit of working in strings. =head1 NOTES CLASS is a constant, not a subroutine call. $CLASS is a plain variable, it is not tied. There is no performance loss for using CLASS over __PACKAGE__ except the loading of the module. (Thanks Juerd) =head1 AUTHOR From February 2022 onward: Jacques Deguest EFE Michael G Schwern =head1 LICENSE This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L =head1 SEE ALSO L =cut 1; CLASS-v1.1.8/Makefile.PL0000644000175100000240000000222214503541002013643 0ustar jackdialoutuse 5.004; use ExtUtils::MakeMaker; WriteMakefile( NAME => 'CLASS', AUTHOR => 'Jacques Deguest ', VERSION_FROM => 'lib/CLASS.pm', ABSTRACT_FROM => 'lib/CLASS.pm', PL_FILES => {}, PREREQ_PM => {}, TEST_REQUIRES => { 'Test::More' => '0.07', }, LICENSE => 'perl_5', (MM->can('signature_target') ? (SIGN => 1) : ()), dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', DIST_CP => 'cp' }, clean => { FILES => 'CLASS-*' }, ( eval { ExtUtils::MakeMaker->VERSION(6.46) } ? ( META_MERGE => { 'meta-spec' => { version => 2 }, dynamic_config => 1, resources => { # homepage => undef, repository => { url => 'git@github.com:jackdeguest/CLASS.git', web => 'https://github.com/jackdeguest/CLASS', type => 'git', }, bugtracker => { web => 'https://github.com/jackdeguest/CLASS/issues', }, }, }) : ()), ); CLASS-v1.1.8/MANIFEST0000644000175100000240000000042614503541171013035 0ustar jackdialoutChanges CONTRIBUTING.md lib/CLASS.pm Makefile.PL MANIFEST META.yml Module meta-data (added by MakeMaker) README SIGNATURE Public-key signature (added by MakeMaker) t/0-signature.t t/CLASS.t META.json Module JSON meta-data (added by MakeMaker) CLASS-v1.1.8/META.json0000644000175100000240000000226514503541171013330 0ustar jackdialout{ "abstract" : "Alias for __PACKAGE__", "author" : [ "Jacques Deguest " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "CLASS", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : {} }, "test" : { "requires" : { "Test::More" : "0.07" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/jackdeguest/CLASS/issues" }, "repository" : { "type" : "git", "web" : "https://github.com/jackdeguest/CLASS" } }, "version" : "v1.1.8", "x_serialization_backend" : "JSON::PP version 4.07" } CLASS-v1.1.8/META.yml0000644000175100000240000000123514503541171013154 0ustar jackdialout--- abstract: 'Alias for __PACKAGE__' author: - 'Jacques Deguest ' build_requires: ExtUtils::MakeMaker: '0' Test::More: '0.07' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: CLASS no_index: directory: - t - inc requires: {} resources: bugtracker: https://github.com/jackdeguest/CLASS/issues repository: https://github.com/jackdeguest/CLASS version: v1.1.8 x_serialization_backend: 'CPAN::Meta::YAML version 0.018' CLASS-v1.1.8/README0000644000175100000240000000167714211372514012574 0ustar jackdialoutNAME CLASS - Alias for __PACKAGE__ SYNOPSIS package Foo; use CLASS; print CLASS; # Foo print "My class is $CLASS\n"; # My class is Foo sub bar { 23 } print CLASS->bar; # 23 print $CLASS->bar; # 23 DESCRIPTION CLASS and $CLASS are both synonyms for __PACKAGE__. Easier to type. $CLASS has the additional benefit of working in strings. NOTES CLASS is a constant, not a subroutine call. $CLASS is a plain variable, it is not tied. There is no performance loss for using CLASS over __PACKAGE__ except the loading of the module. (Thanks Juerd) AUTHOR From February 2022 onward: Jacques Deguest Michael G Schwern LICENSE This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See SEE ALSO perlmod(1) CLASS-v1.1.8/SIGNATURE0000644000175100000240000000423214503541171013167 0ustar jackdialoutThis file contains message digests of all files listed in MANIFEST, signed via the Module::Signature module, version 0.88. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: % cpansign -v It will check each file's integrity, as well as the signature's validity. If "==> Signature verified OK! <==" is not displayed, the distribution may already have been compromised, and you should not run its Makefile.PL or Build.PL. -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 SHA256 e704b239341524f638c38f24cc3e4dd5b22077f7724953f18bb11b61bf6a6ea6 CONTRIBUTING.md SHA256 4ee998bd71b1f1f0bab0f3fbe63db24152ec3acc79477e53b6ce658492056a25 Changes SHA256 ac5f87eece5fbd7ac5280a77bff635e8babb2d7bbba5e2d6ab932f5d19d002a7 MANIFEST SHA256 c979f4f7582a50937b6ae48ce79589ace5429d39242a310207bff42e38dd08c4 META.json SHA256 1642528bcb65e37ddbb0c05b9b250b0fd1e754f6e8b2b777beef7a6043707966 META.yml SHA256 961d83ff4da1b03a20d069a556cca665147a6e093f0ad2e55fa1aed30af5cdd2 Makefile.PL SHA256 b9ff25631d66d99af7f55f9f6221cc3a97ae543f071d5a5262ceb4ccca7b6bfa README SHA256 847638fefcb55be2c76751373384577f73efd4fc3b81816e7df4c1411ed555d9 lib/CLASS.pm SHA256 2a3b9dd39559384b198a48549880ccf30d6a576bfb93481458ec5312d3a6fa71 t/0-signature.t SHA256 5989f5121b6a8d1ccd2333b9af925fd4343431c95d6dda95dd1c9d60611aed2f t/CLASS.t -----BEGIN PGP SIGNATURE----- iQIzBAEBAwAdFiEENa28Ovg1XoRROdiWXzwCYc2y51IFAmUOwnkACgkQXzwCYc2y 51Jn9hAAhi+NHQaEG/SrK+3ugtzwiX7z3b3xoXv3ePqYd2w6KpgzA8kq0mTL7OIs DDP/p0N93+He/ihcQWYdmxkkeqs0fOJzxTXuQTPzbsHp8KLR0VEA40Lx722Qw7m7 66bezOv6imvpbWnJkluunB+k/+d6GJ6p3OZGo7Fo7LmmFUjyfpkpopyILYSD9xNo 3H/lgwU29UeAWzrStN4RXzmA70MLa9KYeSGOjsM4cFXdtCKjdu1/M5GTXK13Q0v9 EG4EKPR2sFubTCpyv2PZH/vnK0/+7J7KgG1rK6lA42DyVhZXQ+QqIUC4x/Tjpsci 79kYOh5e19fTOsTktOvKAYFElAKbjo4KiEO/Yni8xm/w3mjPQyjKnDvOdax+mhMo VaRrM0eib/LLNPz3lmtMMP8wV7q09M4uisLVg0nu8VUzKDRsZx9tpbPKEHtrXarG iPxJww/S9ZW9h/xDgSLWLxuXemS8lx4XGWR+9DFvzohd7z5fp6RvQyrWsA8lGJWc enMiqqL9FHdSG5ezzvcrkWoPYj/9TFMyUg2wRhmvJQmGTpItQ1DdOJhf9VXUXg+x F2RC+iQ5ZcJpmoDrGhyf+G3i4m8YDZ2fppyE2giNDO09RX4T4np4j+7Jd0iqEQGP xPMA7tKPvMNNvvED2MIpD/kqoLcjoCvEWHheeK+GViXF/1hotYU= =1def -----END PGP SIGNATURE----- CLASS-v1.1.8/t/0000755000175100000240000000000014503541171012145 5ustar jackdialoutCLASS-v1.1.8/t/0-signature.t0000644000175100000240000000170514211374273014476 0ustar jackdialout#!/usr/bin/perl use Test::More; if (!$ENV{TEST_SIGNATURE}) { plan skip_all => "Set the environment variable TEST_SIGNATURE to enable this test."; } elsif (!eval { require Module::Signature; 1 }) { plan skip_all => "Next time around, consider installing Module::Signature, ". "so you can verify the integrity of this distribution."; } elsif ( !-e 'SIGNATURE' ) { plan skip_all => "SIGNATURE not found"; } elsif ( -s 'SIGNATURE' == 0 ) { plan skip_all => "SIGNATURE file empty"; } elsif (!eval { require Socket; Socket::inet_aton('pool.sks-keyservers.net') }) { plan skip_all => "Cannot connect to the keyserver to check module ". "signature"; } else { plan tests => 1; } my $ret = Module::Signature::verify(); SKIP: { skip "Module::Signature cannot verify", 1 if $ret eq Module::Signature::CANNOT_VERIFY(); cmp_ok $ret, '==', Module::Signature::SIGNATURE_OK(), "Valid signature"; } CLASS-v1.1.8/t/CLASS.t0000644000175100000240000000436710512571716013215 0ustar jackdialout#!/usr/bin/perl -w use 5.004; use Test::More tests => 22; BEGIN { use_ok('CLASS'); } package Foo; use CLASS; ::is( CLASS, __PACKAGE__, 'CLASS is right' ); ::is( $CLASS, __PACKAGE__, '$CLASS is right' ); sub bar { 23 } sub check_caller { caller } ::is( CLASS->bar, 23, 'CLASS->meth' ); ::is( $CLASS->bar, 23, '$CLASS->meth' ); #line 42 eval { CLASS->i_dont_exist }; my $CLASS_death = $@; #line 42 eval { $CLASS->i_dont_exist }; my $CLASS_scalar_death = $@; #line 42 eval { __PACKAGE__->i_dont_exist }; my $Foo_death = $@; ::is( $CLASS_death, $Foo_death, '__PACKAGE__ and CLASS die the same' ); ::is( $CLASS_scalar_death, $Foo_death, '__PACKAGE__ and $CLASS die the same' ); #line 29 my $CLASS_caller = CLASS->check_caller; my $CLASS_scalar_caller = $CLASS->check_caller; my $Foo_caller = __PACKAGE__->check_caller; ::is($CLASS_caller, $Foo_caller, 'caller preserved' ); ::is($CLASS_scalar_caller, $Foo_caller, 'caller preserved' ); sub foo { return join ':', @_ } ::is( CLASS->foo, 'Foo', 'Right CLASS to class method call' ); ::is( $CLASS->foo, 'Foo', 'Right $CLASS to class method call' ); ::is( CLASS->foo('bar'), 'Foo:bar', 'CLASS: Arguments preserved' ); ::is( $CLASS->foo('bar'), 'Foo:bar', '$CLASS: Arguments preserved' ); { package Bar; use CLASS; sub Yarrow::Func { my($passed_class, $passed_class_scalar) = @_; ::is( CLASS, __PACKAGE__, 'CLASS works in tricky subroutine' ); ::is( $CLASS, __PACKAGE__, '$CLASS works in tricky subroutine' ); ::is( $passed_class, 'Foo', 'CLASS as sub argument' ); ::is( $passed_class_scalar, 'Foo', '$CLASS as sub argument' ); ::is( $_[0], 'Foo', 'CLASS in @_' ); ::is( $_[1], 'Foo', '$CLASS in @_' ); } } Yarrow::Func(CLASS, $CLASS); # Make sure AUTOLOAD is preserved. package Bar; sub AUTOLOAD { return "Autoloader" } ::is( CLASS->i_dont_exist, 'Autoloader', 'CLASS: AUTOLOAD preserved' ); ::is( $CLASS->i_dont_exist, 'Autoloader', '$CLASS: AUTOLOAD preserved' ); package main; eval q{ CLASS(42); }; like( $@, '/^Too many arguments for main::CLASS/', 'CLASS properly prototyped' );