-#!/usr/bin/perl
-use warnings;
-use strict;
-use Module::Build;
-
-Module::Build->new(
- module_name => 'Class::Accessor::Grouped',
- dist_author => [
- 'Matt S. Trout <mst@shadowcatsystems.co.uk>',
- 'Christopher H. Laco <claco@chrislaco.com>'
- ],
- license => 'perl',
- requires => {
- 'Carp' => 0,
- 'Scalar::Util' => 0,
- 'Class::ISA' => 0
- },
- create_makefile_pl => 'passthrough',
- create_readme => 1,
-)->create_build_script;
+# $Id$
+require 'Makefile.PL';
\ No newline at end of file
Revision history for Class::Accessor::Grouped.
+0 04000 Sat May 05 21:17:23 2007
+ - Converted to Module::Install
+ - Added culterific tests/TEST_AUTHOR
+ - Converted to distro friendly version number
+
0.03 2006-11-07 21:33::35
- big speedup for get_inherited
- - get_inherited now checks the current class first before calculating super_path
+ - get_inherited now checks the current class first before calculating
+ super_path
- get_inherited now caches super_path results
0.02 2006-06-26 19:23:13
0.01 2006-06-26 17:38:23
- initial release
+
+++ /dev/null
-Build.PL\r
-Changes\r
-lib/Class/Accessor/Grouped.pm\r
-Makefile.PL\r
-MANIFEST This list of files\r
-MANIFEST.SKIP\r
-META.yml\r
-README\r
-t/accessors.t\r
-t/accessors_ro.t\r
-t/accessors_wo.t\r
-t/inherited.t\r
-t/lib/AccessorGroups.pm\r
-t/lib/AccessorGroupsRO.pm\r
-t/lib/AccessorGroupsWO.pm\r
-t/lib/BaseInheritedGroups.pm\r
-t/lib/NotHashBased.pm\r
-t/lib/SuperInheritedGroups.pm\r
-t/pod-coverage.t\r
-t/pod.t\r
# Avoid Module::Build generated and utility files.
\bBuild$
\b_build
+Build.PL
Build.bat
# Avoid temp and backup files.
--- /dev/null
+# $Id$
+use strict;
+use warnings;
+use inc::Module::Install 0.65;
+
+name 'Class-Accessor-Grouped';
+license 'perl';
+perl_version '5.006001';
+all_from 'lib/Class/Accessor/Grouped.pm';
+
+requires 'Carp';
+requires 'Scalar::Util';
+requires 'Class::ISA';
+
+tests "t/*.t t/*/*.t";
+clean_files "Class-Accessor-Grouped-* t/var";
+
+eval {
+ system 'pod2text lib/Class/Accessor/Grouped.pm > README';
+};
+
+auto_install;
+WriteAll;
--- /dev/null
+NAME
+ Class::Accessor::Grouped - Lets you build groups of accessors
+
+SYNOPSIS
+DESCRIPTION
+ This class lets you build groups of accessors that will call different
+ getters and setters.
+
+METHODS
+ mk_group_accessors
+ Arguments: $group, @fieldspec
+ Returns: none
+
+ Creates a set of accessors in a given group.
+
+ $group is the name of the accessor group for the generated accessors;
+ they will call get_$group($field) on get and set_$group($field, $value)
+ on set.
+
+ @fieldspec is a list of field/accessor names; if a fieldspec is a scalar
+ this is used as both field and accessor name, if a listref it is
+ expected to be of the form [ $accessor, $field ].
+
+ mk_group_ro_accessors
+ Arguments: $group, @fieldspec
+ Returns: none
+
+ Creates a set of read only accessors in a given group. Identical to
+ <L:/mk_group_accessors> but accessors will throw an error if passed a
+ value rather than setting the value.
+
+ mk_group_wo_accessors
+ Arguments: $group, @fieldspec
+ Returns: none
+
+ Creates a set of write only accessors in a given group. Identical to
+ <L:/mk_group_accessors> but accessors will throw an error if not passed
+ a value rather than getting the value.
+
+ make_group_accessor
+ Arguments: $group, $field
+ Returns: $sub (\CODE)
+
+ Returns a single accessor in a given group; called by mk_group_accessors
+ for each entry in @fieldspec.
+
+ make_group_ro_accessor
+ Arguments: $group, $field
+ Returns: $sub (\CODE)
+
+ Returns a single read-only accessor in a given group; called by
+ mk_group_ro_accessors for each entry in @fieldspec.
+
+ make_group_wo_accessor
+ Arguments: $group, $field
+ Returns: $sub (\CODE)
+
+ Returns a single write-only accessor in a given group; called by
+ mk_group_wo_accessors for each entry in @fieldspec.
+
+ get_simple
+ Arguments: $field
+ Returns: $value
+
+ Simple getter for hash-based objects which returns the value for the
+ field name passed as an argument.
+
+ set_simple
+ Arguments: $field, $new_value
+ Returns: $new_value
+
+ Simple setter for hash-based objects which sets and then returns the
+ value for the field name passed as an argument.
+
+ get_inherited
+ Arguments: $field
+ Returns: $value
+
+ Simple getter for Classes and hash-based objects which returns the value
+ for the field name passed as an argument. This behaves much like
+ Class::Data::Accessor where the field can be set in a base class,
+ inherited and changed in subclasses, and inherited and changed for
+ object instances.
+
+ set_inherited
+ Arguments: $field, $new_value
+ Returns: $new_value
+
+ Simple setter for Classes and hash-based objects which sets and then
+ returns the value for the field name passed as an argument. When called
+ on a hash-based object it will set the appropriate hash key value. When
+ called on a class, it will set a class level variable.
+
+ Note:: This method will die if you try to set an object variable on a
+ non hash-based object.
+
+ get_super_paths
+ Returns a list of 'parent' or 'super' class names that the current class
+ inherited from.
+
+AUTHORS
+ Matt S. Trout <mst@shadowcatsystems.co.uk> Christopher H. Laco
+ <claco@chrislaco.com>
+
+LICENSE
+ You may distribute this code under the same terms as Perl itself.
+
use Scalar::Util qw/blessed reftype/;
use vars qw($VERSION);
-$VERSION = '0.03';
+$VERSION = '0.04000';
=head1 NAME
--- /dev/null
+#!perl -wT
+# $Id$
+use strict;
+use warnings;
+
+BEGIN {
+ use lib 't/lib';
+ use Test::More tests => 1;
+
+ use_ok('Class::Accessor::Grouped');
+};
--- /dev/null
+#!perl -wT
+# $Id$
+use strict;
+use warnings;
+
+BEGIN {
+ use lib 't/lib';
+ use Test::More;
+
+ plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR};
+
+ eval 'use Test::CheckManifest 0.09';
+ if($@) {
+ plan skip_all => 'Test::CheckManifest 0.09 not installed';
+ };
+};
+
+ok_manifest({
+ exclude => ['/t/var', '/cover_db'],
+ filter => [qr/\.svn/, qr/cover/, qr/Build(.(PL|bat))?/, qr/_build/],
+ bool => 'or'
+});
+++ /dev/null
-use Test::More;
-eval "use Test::Pod::Coverage 1.00";
-plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@;
-all_pod_coverage_ok();
+++ /dev/null
-use Test::More;
-eval 'use Test::Spelling 0.11';
-plan skip_all => 'Test::Spelling 0.11 not installed' if $@;
-plan skip_all => 'set TEST_SPELLING to enable this test' unless $ENV{TEST_SPELLING};
-
-set_spell_cmd('aspell list');
-
-add_stopwords(<DATA>);
-
-all_pod_files_spelling_ok();
-
-__DATA__
-Bowden
-Raygun
-isa
-mst
-behaviour
-further
-overridable
-Laco
-Pauley
-claco
-stylings
-fieldspec
-listref
+++ /dev/null
-use Test::More;
-eval "use Test::Pod 1.00";
-plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
-all_pod_files_ok();
--- /dev/null
+#!perl -wT
+# $Id$
+use strict;
+use warnings;
+
+BEGIN {
+ use lib 't/lib';
+ use Test::More;
+
+ plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR};
+
+ eval 'use Test::Pod::Coverage 1.04';
+ plan skip_all => 'Test::Pod::Coverage 1.04' if $@;
+
+ eval 'use Pod::Coverage 0.14';
+ plan skip_all => 'Pod::Coverage 0.14 not installed' if $@;
+};
+
+my $trustme = {
+ trustme => [qr/^(g|s)et_component_class$/]
+};
+
+all_pod_coverage_ok($trustme);
--- /dev/null
+#!perl -w
+# $Id$
+use strict;
+use warnings;
+
+BEGIN {
+ use lib 't/lib';
+ use Test::More;
+
+ plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR};
+
+ eval 'use Test::Spelling 0.11';
+ plan skip_all => 'Test::Spelling 0.11 not installed' if $@;
+};
+
+set_spell_cmd('aspell list');
+
+add_stopwords(<DATA>);
+
+all_pod_files_spelling_ok();
+
+__DATA__
+Bowden
+Raygun
+isa
+mst
+behaviour
+further
+overridable
+Laco
+Pauley
+claco
+stylings
+fieldspec
+listref
--- /dev/null
+#!perl -wT
+# $Id$
+use strict;
+use warnings;
+
+BEGIN {
+ use lib 't/lib';
+ use Test::More;
+
+ plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR};
+
+ eval 'use Test::Pod 1.00';
+ plan skip_all => 'Test::Pod 1.00 not installed' if $@;
+};
+
+all_pod_files_ok();
--- /dev/null
+#!perl -wT
+# $Id$
+use strict;
+use warnings;
+
+BEGIN {
+ use lib 't/lib';
+ use Test::More;
+ use File::Find;
+ use File::Basename;
+
+ plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR};
+
+ eval 'use Test::Strict';
+ plan skip_all => 'Test::Strict not installed' if $@;
+ plan skip_all => 'Need untaint in newer File::Find' if $] <= 5.006;
+};
+
+## I hope this can go away if Test::Strict or File::Find::Rule
+## finally run under -T. Until then, I'm on my own here. ;-)
+my @files;
+my %trusted = (
+
+);
+
+find({ wanted => \&wanted,
+ untaint => 1,
+ untaint_pattern => qr|^([-+@\w./]+)$|,
+ untaint_skip => 1,
+ no_chdir => 1
+}, qw(lib t));
+
+sub wanted {
+ my $name = $File::Find::name;
+ my $file = fileparse($name);
+
+ return if $name =~ /TestApp/;
+
+ if ($name =~ /\.(pm|pl|t)$/i && !exists($trusted{$file})) {
+ push @files, $name;
+ };
+};
+
+if (scalar @files) {
+ plan tests => scalar @files;
+} else {
+ plan tests => 1;
+ fail 'No perl files found for Test::Strict checks!';
+};
+
+foreach (@files) {
+ strict_ok($_);
+};
--- /dev/null
+#!perl -wT
+# $Id$
+use strict;
+use warnings;
+
+BEGIN {
+ use Test::More;
+
+ plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR};
+
+ eval 'use Test::NoTabs 0.03';
+ plan skip_all => 'Test::NoTabs 0.03 not installed' if $@;
+};
+
+all_perl_files_ok('lib');
--- /dev/null
+#!perl -wT
+# $Id$
+use strict;
+use warnings;
+
+BEGIN {
+ use lib 't/lib';
+ use Test::More;
+ use File::Find;
+ use File::Basename;
+
+ plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR};
+
+ eval 'use Test::Strict 0.05';
+ plan skip_all => 'Test::Strict 0.05 not installed' if $@;
+ plan skip_all => 'Need untaint in newer File::Find' if $] <= 5.006;
+};
+
+## I hope this can go away if Test::Strict or File::Find::Rule
+## finally run under -T. Until then, I'm on my own here. ;-)
+my @files;
+my %trusted = (
+
+);
+
+find({ wanted => \&wanted,
+ untaint => 1,
+ untaint_pattern => qr|^([-+@\w./]+)$|,
+ untaint_skip => 1,
+ no_chdir => 1
+}, qw(lib t));
+
+sub wanted {
+ my $name = $File::Find::name;
+ my $file = fileparse($name);
+
+ return if $name =~ /TestApp/;
+
+ if ($name =~ /\.(pm|pl|t)$/i && !exists($trusted{$file})) {
+ push @files, $name;
+ };
+};
+
+if (scalar @files) {
+ plan tests => scalar @files;
+} else {
+ plan tests => 1;
+ fail 'No perl files found for Test::Strict checks!';
+};
+
+foreach (@files) {
+ warnings_ok($_);
+};