Class-Tiny-Chained-0.004000755000764000764 012766714320 15055 5ustar00grinnzgrinnz000000000000README100644000764000764 232712766714320 16022 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004NAME Class::Tiny::Chained - Minimalist class construction, with chained attributes SYNOPSIS In Person.pm: package Person; use Class::Tiny::Chained qw( name ); 1; In Employee.pm: package Employee; use parent 'Person'; use Class::Tiny::Chained qw( ssn ), { timestamp => sub { time } # attribute with default }; 1; In example.pl: use Employee; my $obj = Employee->new( name => "Larry", ssn => "111-22-3333" ); # attribute setters are chainable my $obj = Employee->new->name("Fred")->ssn("444-55-6666"); my $ts = $obj->name("Bob")->timestamp; DESCRIPTION Class::Tiny::Chained is a wrapper around Class::Tiny which makes the generated attribute accessors chainable; that is, when setting an attribute value, the object is returned so that further methods can be called. BUGS Report any issues on the public bugtracker. AUTHOR Dan Book COPYRIGHT AND LICENSE This software is Copyright (c) 2015 by Dan Book. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) SEE ALSO Object::Tap, MooX::ChainedAttributes Changes100644000764000764 51112766714320 16406 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.0040.004 2016-09-16 03:01:25 EDT - Further optimize generated accessors for chaining case (thanks haarg) 0.003 2016-09-10 15:55:29 EDT - Optimize generated accessors similarly to Class::Tiny 1.006 0.002 2015-12-17 18:26:18 EST - Removed non-core dependencies 0.001 2015-10-30 12:18:23 EDT - First release LICENSE100644000764000764 2151512766714320 16167 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004This software is Copyright (c) 2015 by Dan Book. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) The Artistic License 2.0 Copyright (c) 2000-2006, The Perl Foundation. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software. You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement. Definitions "Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package. "Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures. "You" and "your" means any person who would like to copy, distribute, or modify the Package. "Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. "Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. "Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees. "Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. "Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. "Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future. "Source" form means the source code, documentation source, and configuration files for the Package. "Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form. Permission for Use and Modification Without Distribution (1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. Permissions for Redistribution of the Standard Version (2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. (3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License. Distribution of Modified Versions of the Package as Source (4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following: (a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version. (b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version. (c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under (i) the Original License or (ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee received, and requires that the Source form of the Modified Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed. Distribution of Compiled Forms of the Standard Version or Modified Versions without the Source (5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license. (6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version. Aggregating or Linking the Package (7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation. (8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package. Items That are Not Considered Part of a Modified Version (9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license. General Provisions (10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. (11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license. (12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. (13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed. (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. INSTALL100644000764000764 224712766714320 16174 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004This is the Perl distribution Class-Tiny-Chained. Installing Class-Tiny-Chained is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm Class::Tiny::Chained If it does not have permission to install modules to the current perl, cpanm will automatically set up and install to a local::lib in your home directory. See the local::lib documentation (https://metacpan.org/pod/local::lib) for details on enabling it in your environment. ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan Class::Tiny::Chained ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Makefile.PL % make && make test Then install it: % make install If your perl is system-managed, you can create a local::lib in your home directory to install modules to. For details, see the local::lib documentation: https://metacpan.org/pod/local::lib ## Documentation Class-Tiny-Chained documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc Class::Tiny::Chained cpanfile100644000764000764 20312766714320 16615 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004requires 'perl' => '5.006'; requires 'Class::Tiny' => '1.003'; test_requires 'Scalar::Util'; test_requires 'Test::More' => '0.88'; dist.ini100644000764000764 25412766714320 16563 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004name = Class-Tiny-Chained author = Dan Book license = Artistic_2_0 copyright_holder = Dan Book copyright_year = 2015 [@Author::DBOOK] pod_tests = 1 META.yml100644000764000764 2546112766714320 16437 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004--- abstract: 'Minimalist class construction, with chained attributes' author: - 'Dan Book ' build_requires: ExtUtils::MakeMaker: '0' File::Spec: '0' Scalar::Util: '0' Test::More: '0.88' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.007, CPAN::Meta::Converter version 2.150005' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Class-Tiny-Chained no_index: directory: - eg - examples - inc - share - t - xt provides: Class::Tiny::Chained: file: lib/Class/Tiny/Chained.pm version: '0.004' requires: Class::Tiny: '1.003' perl: '5.006' resources: bugtracker: https://github.com/Grinnz/Class-Tiny-Chained/issues homepage: https://github.com/Grinnz/Class-Tiny-Chained repository: https://github.com/Grinnz/Class-Tiny-Chained.git version: '0.004' x_Dist_Zilla: perl: version: '5.024000' plugins: - class: Dist::Zilla::Plugin::GithubMeta name: '@Author::DBOOK/GithubMeta' version: '0.54' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: '@Author::DBOOK/Readme_Github' version: '0.161170' - class: Dist::Zilla::Plugin::GenerateFile name: '@Author::DBOOK/Generate_Contrib' version: '6.007' - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::DBOOK/MetaConfig' version: '6.007' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: '@Author::DBOOK/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '6.007' include_underscores: 0 Dist::Zilla::Role::MetaProvider::Provider: $Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002003' inherit_missing: '1' inherit_version: '1' meta_noindex: '1' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000031' version: '0.004' name: '@Author::DBOOK/MetaProvides::Package' version: '2.004002' - class: Dist::Zilla::Plugin::Prereqs::FromCPANfile name: '@Author::DBOOK/Prereqs::FromCPANfile' version: '0.08' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: 'git --version': 1.7.1 include_authors: 0 include_releaser: 1 order_by: name paths: - . name: '@Author::DBOOK/Git::Contributors' version: '0.024' - class: Dist::Zilla::Plugin::MetaNoIndex name: '@Author::DBOOK/MetaNoIndex' version: '6.007' - class: Dist::Zilla::Plugin::CheckChangesHasContent name: '@Author::DBOOK/CheckChangesHasContent' version: '0.010' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - CONTRIBUTING.md - Changes - INSTALL - LICENSE - META.json - Makefile.PL - README.pod - dist.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::DBOOK/Git::Check' version: '2.039' - class: Dist::Zilla::Plugin::RewriteVersion config: Dist::Zilla::Plugin::RewriteVersion: add_tarball_name: 0 finders: - ':ExecFiles' - ':InstallModules' global: 0 skip_version_provider: 0 name: '@Author::DBOOK/RewriteVersion' version: '0.015' - class: Dist::Zilla::Plugin::NextRelease name: '@Author::DBOOK/NextRelease' version: '6.007' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: - / commit_msg: v%v%n%n%c Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - CONTRIBUTING.md - Changes - INSTALL - LICENSE - META.json - Makefile.PL - README.pod - dist.ini allow_dirty_match: - (?^:^(?:lib|script|bin)/) changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::DBOOK/Git::Commit' version: '2.039' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: v0.004 tag_format: v%v tag_message: v%v Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::DBOOK/Git::Tag' version: '2.039' - class: Dist::Zilla::Plugin::BumpVersionAfterRelease config: Dist::Zilla::Plugin::BumpVersionAfterRelease: finders: - ':ExecFiles' - ':InstallModules' global: 0 munge_makefile_pl: 0 name: '@Author::DBOOK/BumpVersionAfterRelease' version: '0.015' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: 'Bump version' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - dist.ini allow_dirty_match: - (?^:^(?:lib|script|bin)/) changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::DBOOK/Commit_Version_Bump' version: '2.039' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::DBOOK/Git::Push' version: '2.039' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Author::DBOOK/PodSyntaxTests' version: '6.007' - class: Dist::Zilla::Plugin::PodCoverageTests name: '@Author::DBOOK/PodCoverageTests' version: '6.007' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@Author::DBOOK/Test::ReportPrereqs' version: '0.025' - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - Build.PL - CONTRIBUTING.md - INSTALL - LICENSE - META.json - Makefile.PL - Makefile.PL exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: '@Author::DBOOK/Git::GatherDir' version: '2.039' - class: Dist::Zilla::Plugin::CopyFilesFromBuild name: '@Author::DBOOK/CopyFilesFromBuild' version: '0.161350' - class: Dist::Zilla::Plugin::PruneCruft name: '@Author::DBOOK/PruneCruft' version: '6.007' - class: Dist::Zilla::Plugin::ManifestSkip name: '@Author::DBOOK/ManifestSkip' version: '6.007' - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::DBOOK/MetaYAML' version: '6.007' - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::DBOOK/MetaJSON' version: '6.007' - class: Dist::Zilla::Plugin::License name: '@Author::DBOOK/License' version: '6.007' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: '@Author::DBOOK/ReadmeAnyFromPod' version: '0.161170' - class: Dist::Zilla::Plugin::ExecDir name: '@Author::DBOOK/ExecDir' version: '6.007' - class: Dist::Zilla::Plugin::ShareDir name: '@Author::DBOOK/ShareDir' version: '6.007' - class: Dist::Zilla::Plugin::ExecDir name: '@Author::DBOOK/ScriptDir' version: '6.007' - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@Author::DBOOK/MakeMaker' version: '6.007' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@Author::DBOOK/RunExtraTests' version: '0.029' - class: Dist::Zilla::Plugin::InstallGuide name: '@Author::DBOOK/InstallGuide' version: '1.200007' - class: Dist::Zilla::Plugin::Manifest name: '@Author::DBOOK/Manifest' version: '6.007' - class: Dist::Zilla::Plugin::TestRelease name: '@Author::DBOOK/TestRelease' version: '6.007' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::DBOOK/ConfirmRelease' version: '6.007' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::DBOOK/UploadToCPAN' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.007' - class: Dist::Zilla::Plugin::FinderCode name: '@Author::DBOOK/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '6.007' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '6.007' x_contributors: - 'Dan Book ' x_serialization_backend: 'YAML::Tiny version 1.69' MANIFEST100644000764000764 47312766714320 16253 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.007. CONTRIBUTING.md Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README cpanfile dist.ini lib/Class/Tiny/Chained.pm t/00-report-prereqs.dd t/00-report-prereqs.t t/class.t xt/author/pod-coverage.t xt/author/pod-syntax.t t000755000764000764 012766714320 15241 5ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004class.t100644000764000764 233012766714320 16671 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004/tuse strict; use warnings; package MyClass; use Class::Tiny 'foo'; package MyClass::Chained; use Class::Tiny::Chained 'abc', 'def'; package MyClass::Unchained; @MyClass::Unchained::ISA = ('MyClass::Chained'); use Class::Tiny 'abc'; package MyClass::Rechained; @MyClass::Rechained::ISA = ('MyClass'); use Class::Tiny::Chained 'abc'; package main; use Scalar::Util 'blessed'; use Test::More; my $obj; $obj = MyClass->new; is $obj->foo(2), 2, 'setter is not chained'; is $obj->foo, 2, 'getter is not chained'; $obj = MyClass::Chained->new; is blessed($obj->abc(2)), 'MyClass::Chained', 'setter is chained'; is $obj->abc, 2, 'getter is not chained'; is blessed($obj->def(3)), 'MyClass::Chained', 'setter is chained'; is $obj->def, 3, 'getter is not chained'; $obj = MyClass::Unchained->new; is $obj->abc(2), 2, 'setter is not chained'; is $obj->abc, 2, 'getter is not chained'; is blessed($obj->def(3)), 'MyClass::Unchained', 'setter is chained'; is $obj->def, 3, 'getter is not chained'; $obj = MyClass::Rechained->new; is $obj->foo(2), 2, 'setter is not chained'; is $obj->foo, 2, 'getter is not chained'; is blessed($obj->abc(3)), 'MyClass::Rechained', 'setter is chained'; is $obj->abc, 3, 'getter is not chained'; done_testing; META.json100644000764000764 4134412766714320 16605 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004{ "abstract" : "Minimalist class construction, with chained attributes", "author" : [ "Dan Book " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.007, CPAN::Meta::Converter version 2.150005", "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Class-Tiny-Chained", "no_index" : { "directory" : [ "eg", "examples", "inc", "share", "t", "xt" ] }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Pod::Coverage::TrustPod" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08" } }, "runtime" : { "requires" : { "Class::Tiny" : "1.003", "perl" : "5.006" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "Scalar::Util" : "0", "Test::More" : "0.88" } } }, "provides" : { "Class::Tiny::Chained" : { "file" : "lib/Class/Tiny/Chained.pm", "version" : "0.004" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/Grinnz/Class-Tiny-Chained/issues" }, "homepage" : "https://github.com/Grinnz/Class-Tiny-Chained", "repository" : { "type" : "git", "url" : "https://github.com/Grinnz/Class-Tiny-Chained.git", "web" : "https://github.com/Grinnz/Class-Tiny-Chained" } }, "version" : "0.004", "x_Dist_Zilla" : { "perl" : { "version" : "5.024000" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@Author::DBOOK/GithubMeta", "version" : "0.54" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "@Author::DBOOK/Readme_Github", "version" : "0.161170" }, { "class" : "Dist::Zilla::Plugin::GenerateFile", "name" : "@Author::DBOOK/Generate_Contrib", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::DBOOK/MetaConfig", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Author::DBOOK/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.007" } ], "include_underscores" : 0 }, "Dist::Zilla::Role::MetaProvider::Provider" : { "$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002003", "inherit_missing" : "1", "inherit_version" : "1", "meta_noindex" : "1" }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000031", "version" : "0.004" } }, "name" : "@Author::DBOOK/MetaProvides::Package", "version" : "2.004002" }, { "class" : "Dist::Zilla::Plugin::Prereqs::FromCPANfile", "name" : "@Author::DBOOK/Prereqs::FromCPANfile", "version" : "0.08" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "git --version" : "1.7.1", "include_authors" : 0, "include_releaser" : 1, "order_by" : "name", "paths" : [ "." ] } }, "name" : "@Author::DBOOK/Git::Contributors", "version" : "0.024" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@Author::DBOOK/MetaNoIndex", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", "name" : "@Author::DBOOK/CheckChangesHasContent", "version" : "0.010" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "CONTRIBUTING.md", "Changes", "INSTALL", "LICENSE", "META.json", "Makefile.PL", "README.pod", "dist.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::DBOOK/Git::Check", "version" : "2.039" }, { "class" : "Dist::Zilla::Plugin::RewriteVersion", "config" : { "Dist::Zilla::Plugin::RewriteVersion" : { "add_tarball_name" : 0, "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 0, "skip_version_provider" : 0 } }, "name" : "@Author::DBOOK/RewriteVersion", "version" : "0.015" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::DBOOK/NextRelease", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [ "/" ], "commit_msg" : "v%v%n%n%c" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "CONTRIBUTING.md", "Changes", "INSTALL", "LICENSE", "META.json", "Makefile.PL", "README.pod", "dist.ini" ], "allow_dirty_match" : [ "(?^:^(?:lib|script|bin)/)" ], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::DBOOK/Git::Commit", "version" : "2.039" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "v0.004", "tag_format" : "v%v", "tag_message" : "v%v" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::DBOOK/Git::Tag", "version" : "2.039" }, { "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease", "config" : { "Dist::Zilla::Plugin::BumpVersionAfterRelease" : { "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 0, "munge_makefile_pl" : 0 } }, "name" : "@Author::DBOOK/BumpVersionAfterRelease", "version" : "0.015" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "Bump version" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "dist.ini" ], "allow_dirty_match" : [ "(?^:^(?:lib|script|bin)/)" ], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::DBOOK/Commit_Version_Bump", "version" : "2.039" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::DBOOK/Git::Push", "version" : "2.039" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Author::DBOOK/PodSyntaxTests", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@Author::DBOOK/PodCoverageTests", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@Author::DBOOK/Test::ReportPrereqs", "version" : "0.025" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "Build.PL", "CONTRIBUTING.md", "INSTALL", "LICENSE", "META.json", "Makefile.PL", "Makefile.PL" ], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "@Author::DBOOK/Git::GatherDir", "version" : "2.039" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", "name" : "@Author::DBOOK/CopyFilesFromBuild", "version" : "0.161350" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Author::DBOOK/PruneCruft", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Author::DBOOK/ManifestSkip", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::DBOOK/MetaYAML", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::DBOOK/MetaJSON", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::DBOOK/License", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "@Author::DBOOK/ReadmeAnyFromPod", "version" : "0.161170" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Author::DBOOK/ExecDir", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@Author::DBOOK/ShareDir", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Author::DBOOK/ScriptDir", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@Author::DBOOK/MakeMaker", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@Author::DBOOK/RunExtraTests", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "@Author::DBOOK/InstallGuide", "version" : "1.200007" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::DBOOK/Manifest", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::DBOOK/TestRelease", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::DBOOK/ConfirmRelease", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::DBOOK/UploadToCPAN", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.007" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Author::DBOOK/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.007" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "6.007" } }, "x_contributors" : [ "Dan Book " ], "x_serialization_backend" : "Cpanel::JSON::XS version 3.0217" } Makefile.PL100644000764000764 233612766714320 17114 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.007. use strict; use warnings; use 5.006; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Minimalist class construction, with chained attributes", "AUTHOR" => "Dan Book ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Class-Tiny-Chained", "LICENSE" => "artistic_2", "MIN_PERL_VERSION" => "5.006", "NAME" => "Class::Tiny::Chained", "PREREQ_PM" => { "Class::Tiny" => "1.003" }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "Scalar::Util" => 0, "Test::More" => "0.88" }, "VERSION" => "0.004", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Class::Tiny" => "1.003", "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "Scalar::Util" => 0, "Test::More" => "0.88" ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); CONTRIBUTING.md100644000764000764 1015612766714320 17412 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004# HOW TO CONTRIBUTE Thank you for considering contributing to this distribution. This file contains instructions that will help you work with the source code. The distribution is managed with [Dist::Zilla](https://metacpan.org/pod/Dist::Zilla). This means that many of the usual files you might expect are not in the repository, but are generated at release time. Some generated files are kept in the repository as a convenience (e.g. Build.PL/Makefile.PL and META.json). Generally, **you do not need Dist::Zilla to contribute patches**. You may need Dist::Zilla to create a tarball. See below for guidance. ## Getting dependencies If you have App::cpanminus 1.6 or later installed, you can use [cpanm](https://metacpan.org/pod/cpanm) to satisfy dependencies like this: $ cpanm --installdeps --with-develop . You can also run this command (or any other cpanm command) without installing App::cpanminus first, using the fatpacked `cpanm` script via curl or wget: $ curl -L https://cpanmin.us | perl - --installdeps --with-develop . $ wget -qO - https://cpanmin.us | perl - --installdeps --with-develop . Otherwise, look for either a `cpanfile` or `META.json` file for a list of dependencies to satisfy. ## Running tests You can run tests directly using the `prove` tool: $ prove -l $ prove -lv t/some_test_file.t For most of my distributions, `prove` is entirely sufficient for you to test any patches you have. I use `prove` for 99% of my testing during development. ## Code style and tidying Please try to match any existing coding style. If there is a `.perltidyrc` file, please install Perl::Tidy and use perltidy before submitting patches. ## Installing and using Dist::Zilla [Dist::Zilla](https://metacpan.org/pod/Dist::Zilla) is a very powerful authoring tool, optimized for maintaining a large number of distributions with a high degree of automation, but it has a large dependency chain, a bit of a learning curve and requires a number of author-specific plugins. To install it from CPAN, I recommend one of the following approaches for the quickest installation: # using CPAN.pm, but bypassing non-functional pod tests $ cpan TAP::Harness::Restricted $ PERL_MM_USE_DEFAULT=1 HARNESS_CLASS=TAP::Harness::Restricted cpan Dist::Zilla # using cpanm, bypassing *all* tests $ cpanm -n Dist::Zilla In either case, it's probably going to take about 10 minutes. Go for a walk, go get a cup of your favorite beverage, take a bathroom break, or whatever. When you get back, Dist::Zilla should be ready for you. Then you need to install any plugins specific to this distribution: $ dzil authordeps --missing | cpanm You can use Dist::Zilla to install the distribution's dependencies if you haven't already installed them with cpanm: $ dzil listdeps --missing --develop | cpanm Once everything is installed, here are some dzil commands you might try: $ dzil build $ dzil test You can learn more about Dist::Zilla at http://dzil.org/ ## Other notes This distribution maintains the generated `META.json` and either `Makefile.PL` or `Build.PL` in the repository. This allows two things: [Travis CI](https://travis-ci.org/) can build and test the distribution without requiring Dist::Zilla, and the distribution can be installed directly from Github or a local git repository using `cpanm` for testing (again, not requiring Dist::Zilla). $ cpanm git://github.com/Author/Distribution-Name.git $ cd Distribution-Name; cpanm . Contributions are preferred in the form of a Github pull request. See [Using pull requests](https://help.github.com/articles/using-pull-requests/) for further information. You can use the Github issue tracker to report issues without an accompanying patch. # CREDITS This file was adapted from an initial `CONTRIBUTING.mkdn` file from David Golden under the terms of the Apache 2 license, with inspiration from the contributing documents from [Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING](https://metacpan.org/pod/Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING) and [Dist::Zilla::PluginBundle::Author::ETHER](https://metacpan.org/pod/Dist::Zilla::PluginBundle::Author::ETHER). 00-report-prereqs.t100644000764000764 1271412766714320 21022 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004/t#!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.025 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do 't/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if $mod eq 'perl'; next if grep { $_ eq $mod } @exclude; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( @dep_errors ) { diag join("\n", "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n", "The following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass; # vim: ts=4 sts=4 sw=4 et: author000755000764000764 012766714320 16733 5ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004/xtpod-syntax.t100644000764000764 25212766714320 21345 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004/xt/author#!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); 00-report-prereqs.dd100644000764000764 237612766714320 21131 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004/tdo { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0' } }, 'develop' => { 'requires' => { 'Pod::Coverage::TrustPod' => '0', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.08' } }, 'runtime' => { 'requires' => { 'Class::Tiny' => '1.003', 'perl' => '5.006' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'Scalar::Util' => '0', 'Test::More' => '0.88' } } }; $x; }pod-coverage.t100644000764000764 33412766714320 21613 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004/xt/author#!perl # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. use Test::Pod::Coverage 1.08; use Pod::Coverage::TrustPod; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); Tiny000755000764000764 012766714320 17534 5ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004/lib/ClassChained.pm100644000764000764 373412766714320 21574 0ustar00grinnzgrinnz000000000000Class-Tiny-Chained-0.004/lib/Class/Tinypackage Class::Tiny::Chained; use strict; use warnings; use Class::Tiny (); our @ISA = 'Class::Tiny'; our $VERSION = '0.004'; sub __gen_sub_body { my ($self, $name, $has_default, $default_type) = @_; if ($has_default && $default_type eq 'CODE') { return << "HERE"; sub $name { return ( ( \@_ == 1 ) ? ( exists \$_[0]{$name} ? \$_[0]{$name} : ( \$_[0]{$name} = \$default->( \$_[0] ) ) ) : scalar( \$_[0]{$name} = \$_[1], \$_[0] ) ); } HERE } elsif ($has_default) { return << "HERE"; sub $name { return ( ( \@_ == 1 ) ? ( exists \$_[0]{$name} ? \$_[0]{$name} : ( \$_[0]{$name} = \$default ) ) : scalar( \$_[0]{$name} = \$_[1], \$_[0] ) ); } HERE } else { return << "HERE"; sub $name { return \@_ == 1 ? \$_[0]{$name} : scalar( \$_[0]{$name} = \$_[1], \$_[0] ) } HERE } } 1; =head1 NAME Class::Tiny::Chained - Minimalist class construction, with chained attributes =head1 SYNOPSIS In I: package Person; use Class::Tiny::Chained qw( name ); 1; In I: package Employee; use parent 'Person'; use Class::Tiny::Chained qw( ssn ), { timestamp => sub { time } # attribute with default }; 1; In I: use Employee; my $obj = Employee->new( name => "Larry", ssn => "111-22-3333" ); # attribute setters are chainable my $obj = Employee->new->name("Fred")->ssn("444-55-6666"); my $ts = $obj->name("Bob")->timestamp; =head1 DESCRIPTION L is a wrapper around L which makes the generated attribute accessors chainable; that is, when setting an attribute value, the object is returned so that further methods can be called. =head1 BUGS Report any issues on the public bugtracker. =head1 AUTHOR Dan Book =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2015 by Dan Book. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =head1 SEE ALSO L, L