@@ -1,5 +1,11 @@
Revision history for DBIx-Class-Candy
+0.002106 2014-10-17 15:26:43-05:00 America/Chicago
+ - Fix bug causing infinite recursion when you redefine a package (Thanks
+ Graham Knop for fix, and Wes Malone for bug report!)
+ - Simplify sub installer by using Sub::Exporter more correctly (Thanks RJBS!)
+ - Stop calling ->table many times per ResultClass (Good catch RJBS!)
+
0.002105 2014-04-12 08:51:04-05:00 America/Chicago
- Fix warnings in test (thanks for the report Zefram!) (Fixes RT#91976)
@@ -22,7 +22,7 @@ This is free software, licensed under:
Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc.
- 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.013.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.020.
Changes
LICENSE
MANIFEST
@@ -6,6 +6,7 @@ META.json
META.yml
Makefile.PL
README
+cpanfile
dist.ini
lib/DBIx/Class/Candy.pm
lib/DBIx/Class/Candy/Exports.pm
@@ -29,5 +30,8 @@ t/lib/IRC/Schema/Result/Mode.pm
t/lib/IRC/Schema/Result/Network.pm
t/lib/IRC/Schema/Result/User.pm
t/lib/IRC/Schema/ResultSet.pm
+t/lib2/IRC/Schema/Result/Bar.pm
+t/lib2/IRC/Schema/Result/Foo.pm
+t/recursion-bug.t
t/release-pod-syntax.t
weaver.ini
@@ -4,7 +4,7 @@
"Arthur Axel \"fREW\" Schmidt <frioux+cpan@gmail.com>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 5.013, CPAN::Meta::Converter version 2.133380",
+ "generated_by" : "Dist::Zilla version 5.020, CPAN::Meta::Converter version 2.142060",
"license" : [
"perl_5"
],
@@ -16,7 +16,7 @@
"prereqs" : {
"configure" : {
"requires" : {
- "ExtUtils::MakeMaker" : "6.30"
+ "ExtUtils::MakeMaker" : "0"
}
},
"develop" : {
@@ -31,21 +31,29 @@
"MRO::Compat" : "0.11",
"String::CamelCase" : "0",
"Sub::Exporter" : "0.982",
+ "namespace::clean" : "0.18"
+ }
+ },
+ "test" : {
+ "requires" : {
"Test::Deep" : "0",
"Test::Fatal" : "0",
- "Test::More" : "0.94",
- "namespace::clean" : "0.18"
+ "Test::More" : "0.94"
}
}
},
"release_status" : "stable",
"resources" : {
+ "bugtracker" : {
+ "web" : "https://github.com/frioux/DBIx-Class-Candy/issues"
+ },
+ "homepage" : "https://github.com/frioux/DBIx-Class-Candy",
"repository" : {
"type" : "git",
- "url" : "git://github.com/frioux/DBIx-Class-Candy.git",
- "web" : "http://github.com/frioux/DBIx-Class-Candy"
+ "url" : "https://github.com/frioux/DBIx-Class-Candy.git",
+ "web" : "https://github.com/frioux/DBIx-Class-Candy"
}
},
- "version" : "0.002105"
+ "version" : "0.002106"
}
@@ -2,11 +2,14 @@
abstract: 'Sugar for your favorite ORM, DBIx::Class'
author:
- 'Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>'
-build_requires: {}
+build_requires:
+ Test::Deep: '0'
+ Test::Fatal: '0'
+ Test::More: '0.94'
configure_requires:
- ExtUtils::MakeMaker: '6.30'
+ ExtUtils::MakeMaker: '0'
dynamic_config: 0
-generated_by: 'Dist::Zilla version 5.013, CPAN::Meta::Converter version 2.133380'
+generated_by: 'Dist::Zilla version 5.020, CPAN::Meta::Converter version 2.142060'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -18,10 +21,9 @@ requires:
MRO::Compat: '0.11'
String::CamelCase: '0'
Sub::Exporter: '0.982'
- Test::Deep: '0'
- Test::Fatal: '0'
- Test::More: '0.94'
namespace::clean: '0.18'
resources:
- repository: git://github.com/frioux/DBIx-Class-Candy.git
-version: '0.002105'
+ bugtracker: https://github.com/frioux/DBIx-Class-Candy/issues
+ homepage: https://github.com/frioux/DBIx-Class-Candy
+ repository: https://github.com/frioux/DBIx-Class-Candy.git
+version: '0.002106'
@@ -1,20 +1,19 @@
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.013.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.020.
use strict;
use warnings;
-use ExtUtils::MakeMaker 6.30;
+use ExtUtils::MakeMaker ;
my %WriteMakefileArgs = (
"ABSTRACT" => "Sugar for your favorite ORM, DBIx::Class",
"AUTHOR" => "Arthur Axel \"fREW\" Schmidt <frioux+cpan\@gmail.com>",
- "BUILD_REQUIRES" => {},
"CONFIGURE_REQUIRES" => {
- "ExtUtils::MakeMaker" => "6.30"
+ "ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "DBIx-Class-Candy",
"EXE_FILES" => [],
@@ -26,13 +25,14 @@ my %WriteMakefileArgs = (
"MRO::Compat" => "0.11",
"String::CamelCase" => 0,
"Sub::Exporter" => "0.982",
+ "namespace::clean" => "0.18"
+ },
+ "TEST_REQUIRES" => {
"Test::Deep" => 0,
"Test::Fatal" => 0,
- "Test::More" => "0.94",
- "namespace::clean" => "0.18"
+ "Test::More" => "0.94"
},
- "TEST_REQUIRES" => {},
- "VERSION" => "0.002105",
+ "VERSION" => "0.002106",
"test" => {
"TESTS" => "t/*.t"
}
@@ -0,0 +1,12 @@
+requires 'DBIx::Class' => 0.08123;
+requires 'Sub::Exporter' => 0.982;
+requires 'namespace::clean' => 0.18;
+requires 'MRO::Compat' => 0.11;
+requires 'String::CamelCase' => 0;
+requires 'Lingua::EN::Inflect' => 0;
+
+on test => sub {
+ requires 'Test::More' => 0.94;
+ requires 'Test::Fatal' => 0;
+ requires 'Test::Deep' => 0;
+};
@@ -2,16 +2,13 @@ name = DBIx-Class-Candy
author = Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
license = Perl_5
copyright_holder = Arthur Axel "fREW" Schmidt
-version = 0.002105
+version = 0.002106
[NextRelease]
[@Git]
[@Basic]
-
-[MetaResources]
-repository.url = git://github.com/frioux/DBIx-Class-Candy.git
-repository.web = http://github.com/frioux/DBIx-Class-Candy
-repository.type = git
+[GithubMeta]
+issues = 1
[MetaJSON]
[PodWeaver]
@@ -19,13 +16,4 @@ repository.type = git
[ReadmeFromPod]
[PodSyntaxTests]
-[Prereqs]
-DBIx::Class = 0.08123
-Sub::Exporter = 0.982
-Test::More = 0.94
-Test::Fatal = 0
-Test::Deep = 0
-namespace::clean = 0.18
-MRO::Compat = 0.11
-String::CamelCase = 0
-Lingua::EN::Inflect = 0
+[Prereqs::FromCPANfile]
@@ -5,7 +5,7 @@ package DBIx::Class::Candy::Exports;
use strict;
use warnings;
-our $VERSION = '0.002105'; # VERSION
+our $VERSION = '0.002106'; # VERSION
our %methods;
our %aliases;
@@ -3,7 +3,7 @@ package DBIx::Class::Candy;
use strict;
use warnings;
-our $VERSION = '0.002105'; # VERSION
+our $VERSION = '0.002106'; # VERSION
use namespace::clean;
require DBIx::Class::Candy::Exports;
@@ -82,7 +82,8 @@ sub import {
my $set_table = sub {};
if (my $v = $self->autotable($args->{autotable})) {
my $table_name = $self->gen_table($inheritor, $v);
- $set_table = sub { $inheritor->table($table_name); $set_table = sub {} }
+ my $ran = 0;
+ $set_table = sub { $inheritor->table($table_name) unless $ran++ }
}
@_ = ($self, @rest);
my $import = build_exporter({
@@ -99,7 +100,7 @@ sub import {
qw(has_column primary_column unique_column), @methods, @custom_methods, keys %aliases, keys %custom_aliases
],
},
- installer => $self->installer($inheritor),
+ installer => $self->installer,
collectors => [
INIT => $self->gen_INIT($perl_version, \%custom_aliases, \@custom_methods, $inheritor),
],
@@ -228,10 +229,11 @@ sub gen_proxy {
}
sub installer {
- my ($self, $inheritor) = @_;
+ my ($self) = @_;
sub {
Sub::Exporter::default_installer @_;
- namespace::clean->import( -cleanee => $inheritor )
+ my %subs = @{ $_[1] };
+ namespace::clean->import( -cleanee => $_[0]{into}, keys %subs )
}
}
@@ -0,0 +1,19 @@
+package IRC::Schema::Result::User;
+
+use DBIx::Class::Candy -autotable => v1, -base => 'IRC::Schema::Result';
+
+column id => {
+ data_type => 'int',
+ is_auto_increment => 1,
+};
+
+unique_column handle => {
+ data_type => 'varchar',
+ size => 30,
+};
+
+primary_key 'id';
+
+has_many messages => 'IRC::Schema::Result::Message', 'user_id';
+
+1;
@@ -0,0 +1,38 @@
+package IRC::Schema::Result::Message;
+
+use IRC::Schema::Candy -base => 'DBIx::Class::Core';
+
+table 'Messages';
+
+primary_column id => {
+ data_type => 'int',
+ is_auto_increment => 1,
+};
+
+column user_id => {
+ data_type => 'int',
+};
+
+column mode_id => {
+ data_type => 'int',
+};
+
+column channel_id => {
+ data_type => 'int',
+};
+
+column value => {
+ data_type => 'varchar',
+ size => 100,
+};
+
+column when_said => {
+ data_type => 'datetime',
+};
+
+belongs_to user => 'IRC::Schema::Result::User', 'user_id';
+belongs_to mode => 'IRC::Schema::Result::Mode', 'mode_id';
+belongs_to channel => 'IRC::Schema::Result::Channel', 'channel_id';
+
+1;
+
@@ -0,0 +1,21 @@
+use strict;
+use warnings;
+use Test::More;
+use Try::Tiny;
+
+use lib 't/lib', 't/lib2';
+
+$SIG{__WARN__} = sub { die @_ if $_[0] =~ /Deep recursion/; warn @_; };
+
+try {
+ require IRC::Schema::Result::User;
+ require IRC::Schema::Result::Message;
+ require IRC::Schema::Result::Foo;
+ require IRC::Schema::Result::Bar;
+} catch {
+ ok($_ !~ m/Deep recursion/, q(didn't deeply recurse))
+};
+
+pass('did not crater perl');
+
+done_testing;