Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

start of dzilification

  • Loading branch information...
commit a846fbd8a3f551d3ec036b8f46b13c324b717a91 1 parent 1b8b805
@apocalypse authored
Showing with 55 additions and 287 deletions.
  1. +2 −0  .gitignore
  2. +0 −47 Build.PL
  3. +32 −28 Changes
  4. +0 −16 MANIFEST
  5. +0 −29 MANIFEST.SKIP
  6. +2 −0  dist.ini
  7. +0 −1  examples/db.pl
  8. +13 −102 lib/POE/Component/SimpleDBI.pm
  9. +6 −32 lib/POE/Component/SimpleDBI/SubProcess.pm
  10. 0  { → releases}/POE-Component-SimpleDBI-1.03.tar.gz
  11. 0  { → releases}/POE-Component-SimpleDBI-1.04.tar.gz
  12. 0  { → releases}/POE-Component-SimpleDBI-1.05.tar.gz
  13. 0  { → releases}/POE-Component-SimpleDBI-1.06.tar.gz
  14. 0  { → releases}/POE-Component-SimpleDBI-1.07.tar.gz
  15. 0  { → releases}/POE-Component-SimpleDBI-1.08.tar.gz
  16. 0  { → releases}/POE-Component-SimpleDBI-1.09.tar.gz
  17. 0  { → releases}/POE-Component-SimpleDBI-1.10.tar.gz
  18. 0  { → releases}/POE-Component-SimpleDBI-1.11.tar.gz
  19. 0  { → releases}/POE-Component-SimpleDBI-1.12.tar.gz
  20. 0  { → releases}/POE-Component-SimpleDBI-1.13.tar.gz
  21. 0  { → releases}/POE-Component-SimpleDBI-1.14.tar.gz
  22. 0  { → releases}/POE-Component-SimpleDBI-1.15.tar.gz
  23. 0  { → releases}/POE-Component-SimpleDBI-1.16.tar.gz
  24. 0  { → releases}/POE-Component-SimpleDBI-1.17.tar.gz
  25. 0  { → releases}/POE-Component-SimpleDBI-1.18.tar.gz
  26. 0  { → releases}/POE-Component-SimpleDBI-1.19.tar.gz
  27. 0  { → releases}/POE-Component-SimpleDBI-1.20.tar.gz
  28. 0  { → releases}/POE-Component-SimpleDBI-1.21.tar.gz
  29. 0  { → releases}/POE-Component-SimpleDBI-1.22.tar.gz
  30. 0  { → releases}/POE-Component-SimpleDBI-1.23.tar.gz
  31. 0  { → releases}/POE-Component-SimpleDBI-1.24.tar.gz
  32. 0  { → releases}/POE-Component-SimpleDBI-1.25.tar.gz
  33. 0  { → releases}/POE-Component-SimpleDBI-1.26.tar.gz
  34. 0  { → releases}/POE-Component-SimpleDBI-1.27.tar.gz
  35. 0  { → releases}/POE-Component-SimpleDBI-1.28.tar.gz
  36. 0  { → releases}/POE-Component-SimpleDBI-1.29.tar.gz
  37. +0 −18 t/1_load.t
  38. +0 −14 t/apocalypse.t
View
2  .gitignore
@@ -0,0 +1,2 @@
+/POE-Component-SimpleDBI-*
+/.build/
View
47 Build.PL
@@ -1,47 +0,0 @@
-# Build.PL
-use strict; use warnings;
-use Module::Build;
-
-my $build = Module::Build->new(
- # look up Module::Build::API for the info!
- 'dynamic_config' => 0,
- 'module_name' => 'POE::Component::SimpleDBI',
- 'license' => 'perl',
-
- 'dist_abstract' => 'Asynchronous non-blocking DBI calls in POE made simple',
- 'dist_author' => 'Apocalypse <APOCAL@cpan.org>',
-
- 'create_packlist' => 1,
- 'create_makefile_pl' => 'traditional',
- 'create_readme' => 1,
- 'create_license' => 1,
- 'sign' => 0,
-
- 'test_files' => 't/*.t',
-
- 'add_to_cleanup' => [ 'META.yml', 'Makefile.PL', 'README', 'Makefile', 'LICENSE' ], # automatically generated
-
- 'requires' => {
- # POE Stuff
- 'POE' => 0,
-
- # FIXME POE stuff that Test::Dependencies needs to see
- 'POE::Session' => 0,
- 'POE::Filter::Line' => 0,
- 'POE::Filter::Reference' => 0,
- 'POE::Wheel::Run' => 0,
-
- # DB access
- 'DBI' => '1.30',
-
- # error handling
- 'Error' => '0.15',
-
- # minimum perl version
- 'perl' => '5.006',
- },
-);
-
-# all done!
-$build->create_build_script;
-
View
60 Changes
@@ -1,11 +1,15 @@
Revision history for Perl extension POE::Component::SimpleDBI.
-* 1.29
+{{$NEXT}}
+
+ Converted to Dist::Zilla for the release process!
+
+1.29
Added better caching control in the SubProcess - resolves a memory leak, thanks Andrew Feren and wirelessdreamer!
Added the CACHEDKIDS argument to CONNECT
-* 1.28
+1.28
Minor POD tweaks
Fixed RT#45948 ( Database doesn't reconnect when child died ) - thanks Paul Williams!
@@ -13,28 +17,28 @@ Revision history for Perl extension POE::Component::SimpleDBI.
Fixed RT#48400 ( BAGGAGE not a valid argument for CONNECT ) - thanks Andrew Feren!
BAGGAGE is now a valid argument for CONNECT/DISCONNECT
-* 1.27
+1.27
Fixed RT#43408 ( fix "Modification of a read-only value attempted at" error at shutdown ) - thanks acferen!
Fixed RT#43442 ( tweak binmode for MSWin32 ) - thanks acferen!
Added link to the github.com repository in the POD
Added link to CPAN::Forum in the POD
-* 1.26
+1.26
Kwalitee-related fixes ( moved to Test::Apocalypse )
Fixed RT#42890 ( tweaked Wheel::Run arguments on Win32, please yell at me if it doesn't work for you! )
Added sigCHLD management
-* 1.25
+1.25
Kwalitee-related fixes
-* 1.24
+1.24
Bumped Test::More prereq to 0.86 because I was getting FAIL reports from outdated people :(
-* 1.23
+1.23
Switched to Build.PL for the build system
Fixed the stupid test dependencies, thanks BiNGOs!
@@ -42,31 +46,31 @@ Revision history for Perl extension POE::Component::SimpleDBI.
Added some more author tests
Added AUTO_COMMIT argument to CONNECT to control the DBI variable ( defaults to true )
-* 1.22
+1.22
Kwalitee-related fixes
-* 1.21
+1.21
silence warnings when used with DBD::SQLite - thanks to Sjors Gielen for tracking this down!
-* 1.20
+1.20
Added the INSERT_ID to control $dbh->last_insert_id usage
-* 1.19
+1.19
Added the PREPARE_CACHED argument to control caching
-* 1.18
+1.18
Ignore the DBI error for last_insert_id and default to undef
-* 1.17
+1.17
Added "INSERTID" to the result of DO
-* 1.16
+1.16
Noticed a glaring documentation bug
- SINGLE queries return mixedCaps rows ( not lowercase! )
@@ -76,29 +80,29 @@ Revision history for Perl extension POE::Component::SimpleDBI.
Fixed SimpleDBI failure on Win32 - thanks RT #23851
-* 1.15
+1.15
Thanks to Fred Castellano, who stumbled on a DEADLOCK bug, fixed!
Added sanity tests to CONNECT/DISCONNECT
-* 1.14
+1.14
learned about the difference between ref $self and ref( $self )
Kwalitee-related fixes
-* 1.13
+1.13
Finally use a Changes file - thanks RT #18981
Fixed a bug in SINGLE if returned_rows = 0 it will not return undef, but give us blank rows!
Documentation tweaks
-* 1.12
+1.12
In the SubProcess, added a binmode() to STDIN and STDERR, for the windows attempt
Added code to make SimpleDBI work in Win32 boxes, thanks to the recent Wheel::Run patches!
Documentation tweaks as usual
-* 1.11
+1.11
Hannes had a problem:
His IRC bot logs events to a database, and sometimes there is no events to log after
@@ -107,11 +111,11 @@ Revision history for Perl extension POE::Component::SimpleDBI.
The solution was to do a $dbh->ping() before each query, if your DBI driver does it inefficiently, go yell at them!
In the event that a reconnect is not possible, an error will be sent to the CONNECT event handler, look at the updated pod.
-* 1.10
+1.10
Fixed a bug in the DO routine, thanks to Hannes!
-* 1.09
+1.09
Removed the abstract LIMIT 1 to the SINGLE query
@@ -139,11 +143,11 @@ Revision history for Perl extension POE::Component::SimpleDBI.
Added a new command -> Clear_Queue ( clears the queue )
-* 1.08
+1.08
In the SubProcess, removed the select statement requirement
-* 1.07
+1.07
In the SubProcess, fixed a silly mistake in DO's execution of placeholders
@@ -155,19 +159,19 @@ Revision history for Perl extension POE::Component::SimpleDBI.
Documented the _child events
-* 1.06
+1.06
Fixed some typos in the POD
Added the BAGGAGE option
-* 1.05
+1.05
Fixed some typos in the POD
Fixed the DEBUG + MAX_RETRIES "Subroutine redefined" foolishness
-* 1.04
+1.04
Got rid of the EVENT_S and EVENT_E handlers, replaced with a single EVENT handler
@@ -185,7 +189,7 @@ Revision history for Perl extension POE::Component::SimpleDBI.
Fixed some typos in the POD
-* 1.03
+1.03
Increments refcount for querying sessions so they don't go away
@@ -201,6 +205,6 @@ Revision history for Perl extension POE::Component::SimpleDBI.
SubProcess -> added DBI connect failure handling
-* 1.02
+1.02
Initial release
View
16 MANIFEST
@@ -1,16 +0,0 @@
-Build.PL
-MANIFEST
-MANIFEST.SKIP
-README
-Makefile.PL
-META.yml
-Changes
-LICENSE
-
-lib/POE/Component/SimpleDBI.pm
-lib/POE/Component/SimpleDBI/SubProcess.pm
-
-examples/db.pl
-
-t/1_load.t
-t/apocalypse.t
View
29 MANIFEST.SKIP
@@ -1,29 +0,0 @@
-# skip Eclipse IDE stuff
-\.includepath$
-\.project$
-\.settings/
-
-# Avoid version control files.
-\B\.svn\b
-\B\.git\b
-
-# Avoid Makemaker generated and utility files.
-\bMakefile$
-\bblib/
-\bMakeMaker-\d
-\bpm_to_blib$
-
-# Avoid Module::Build generated and utility files.
-\bBuild$
-\b_build/
-^MYMETA.yml$
-
-# Avoid temp and backup files.
-~$
-\.old$
-\#$
-\b\.#
-\.bak$
-
-# our tarballs
-\.tar\.gz$
View
2  dist.ini
@@ -0,0 +1,2 @@
+name = POE-Component-SimpleDBI
+[@Apocalyptic]
View
1  examples/db.pl
@@ -1,5 +1,4 @@
#!/usr/bin/perl
-use strict; use warnings;
use POE;
use POE::Component::SimpleDBI;
View
115 lib/POE/Component/SimpleDBI.pm
@@ -1,10 +1,6 @@
-# Declare our package
package POE::Component::SimpleDBI;
-use strict; use warnings;
-# Initialize our version
-use vars qw( $VERSION );
-$VERSION = '1.29';
+# ABSTRACT: Asynchronous non-blocking DBI calls in POE made simple
# Import what we need from the POE namespace
use POE; # For the constants
@@ -1322,13 +1318,10 @@ sub Got_STDERR {
}
1;
-__END__
-=for stopwords ARG DBI Kwalitee OID PostgreSQL SQL SimpleDBI's com diff github placeholders
-
-=head1 NAME
+=pod
-POE::Component::SimpleDBI - Asynchronous non-blocking DBI calls in POE made simple
+=for stopwords ARG DBI Kwalitee OID PostgreSQL SQL SimpleDBI's com diff github placeholders
=head1 SYNOPSIS
@@ -1403,19 +1396,14 @@ POE::Component::SimpleDBI - Asynchronous non-blocking DBI calls in POE made simp
},
);
-=head1 ABSTRACT
-
- This module simplifies DBI usage in POE's multitasking world.
-
- This module is a breeze to use, you'll have DBI calls in your POE program
- up and running in only a few seconds of setup.
+=head1 DESCRIPTION
- This module does what XML::Simple does for the XML world.
+This module simplifies DBI usage in POE's multitasking world.
- If you want more advanced usage, check out:
- POE::Component::LaDBI
+This module is a breeze to use, you'll have DBI calls in your POE program
+up and running in only a few seconds of setup.
-=head1 DESCRIPTION
+This module does what XML::Simple does for the XML world.
This module works its magic by creating a new session with POE, then spawning off a child process
to do the "heavy" lifting. That way, your main POE process can continue servicing other clients.
@@ -1609,7 +1597,7 @@ This is a simple boolean value, and if this argument does not exist, SimpleDBI w
way DBI works. What DBI does is cache the statement handle from $dbh->prepare_cached in the $dbh handle. The problem is
that it stays around forever in the default implementation! Perusing the DBI docs revealed that it was possible to tie
this cache to a custom cache module. So I've added the CACHEDKIDS argument, and setting it to an arrayref will enable the
- behavior. Look at L<http://search.cpan.org/~timb/DBI-1.609/DBI.pm#prepare_cached> for more information. Here's an example:
+ behavior. Look at L<http://search.cpan.org/dist/DBI/DBI.pm#prepare_cached> for more information. Here's an example:
$_[KERNEL]->post( 'SimpleDBI', 'CONNECT', ..., 'CACHEDKIDS' => [ 'Tie::Cache::LRU' ] );
@@ -1966,87 +1954,10 @@ You can override this behavior by doing this:
sub POE::Component::SimpleDBI::MAX_RETRIES () { 10 }
use POE::Component::SimpleDBI;
-=head2 EXPORT
-
-Nothing.
-
=head1 SEE ALSO
-
-L<DBI>
-
-L<POE::Component::DBIAgent>
-
-L<POE::Component::LaDBI>
-
-L<POE::Component::EasyDBI>
-
-=head1 SUPPORT
-
-You can find documentation for this module with the perldoc command.
-
- perldoc POE::Component::SimpleDBI
-
-=head2 Websites
-
-=over 4
-
-=item * Search CPAN
-
-L<http://search.cpan.org/dist/POE-Component-SimpleDBI>
-
-=item * AnnoCPAN: Annotated CPAN documentation
-
-L<http://annocpan.org/dist/POE-Component-SimpleDBI>
-
-=item * CPAN Ratings
-
-L<http://cpanratings.perl.org/d/POE-Component-SimpleDBI>
-
-=item * CPAN Forum
-
-L<http://cpanforum.com/dist/POE-Component-SimpleDBI>
-
-=item * RT: CPAN's Request Tracker
-
-L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-SimpleDBI>
-
-=item * CPANTS Kwalitee
-
-L<http://cpants.perl.org/dist/overview/POE-Component-SimpleDBI>
-
-=item * CPAN Testers Results
-
-L<http://cpantesters.org/distro/P/POE-Component-SimpleDBI.html>
-
-=item * CPAN Testers Matrix
-
-L<http://matrix.cpantesters.org/?dist=POE-Component-SimpleDBI>
-
-=item * Git Source Code Repository
-
-This code is currently hosted on github.com under the account "apocalypse". Please feel free to browse it
-and pull from it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
-from your repository :)
-
-L<http://github.com/apocalypse/perl-poe-simpledbi>
-
-=back
-
-=head2 Bugs
-
-Please report any bugs or feature requests to C<bug-poe-component-simpledbi at rt.cpan.org>, or through
-the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=POE-Component-SimpleDBI>. I will be
-notified, and then you'll automatically be notified of progress on your bug as I make changes.
-
-=head1 AUTHOR
-
-Apocalypse E<lt>apocal@cpan.orgE<gt>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 2010 by Apocalypse
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
+DBI
+POE::Component::DBIAgent
+POE::Component::LaDBI
+POE::Component::EasyDBI
=cut
View
38 lib/POE/Component/SimpleDBI/SubProcess.pm
@@ -1,19 +1,15 @@
-# Declare our package
package POE::Component::SimpleDBI::SubProcess;
-use strict; use warnings;
-# Initialize our version
-use vars qw( $VERSION );
-$VERSION = '1.29';
+# ABSTRACT: Backend of POE::Component::SimpleDBI
# Use Error.pm's try/catch semantics
-use Error qw( :try );
+use Error 0.15 qw( :try );
# We pass in data to POE::Filter::Reference
use POE::Filter::Reference;
# We run the actual DB connection here
-use DBI;
+use DBI 1.30;
# Our Filter object
my $filter = POE::Filter::Reference->new();
@@ -687,36 +683,14 @@ sub output {
}
1;
-__END__
-=for stopwords DBI
-
-=head1 NAME
+=pod
-POE::Component::SimpleDBI::SubProcess - Backend of POE::Component::SimpleDBI
+=for stopwords DBI
-=head1 ABSTRACT
+=head1 DESCRIPTION
This module is responsible for implementing the guts of POE::Component::SimpleDBI.
Namely, the fork/exec and the connection to the DBI.
-=head2 EXPORT
-
-Nothing.
-
-=head1 SEE ALSO
-
-L<POE::Component::SimpleDBI>
-
-=head1 AUTHOR
-
-Apocalypse E<lt>apocal@cpan.orgE<gt>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 2010 by Apocalypse
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
=cut
View
0  POE-Component-SimpleDBI-1.03.tar.gz → releases/POE-Component-SimpleDBI-1.03.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.04.tar.gz → releases/POE-Component-SimpleDBI-1.04.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.05.tar.gz → releases/POE-Component-SimpleDBI-1.05.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.06.tar.gz → releases/POE-Component-SimpleDBI-1.06.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.07.tar.gz → releases/POE-Component-SimpleDBI-1.07.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.08.tar.gz → releases/POE-Component-SimpleDBI-1.08.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.09.tar.gz → releases/POE-Component-SimpleDBI-1.09.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.10.tar.gz → releases/POE-Component-SimpleDBI-1.10.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.11.tar.gz → releases/POE-Component-SimpleDBI-1.11.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.12.tar.gz → releases/POE-Component-SimpleDBI-1.12.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.13.tar.gz → releases/POE-Component-SimpleDBI-1.13.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.14.tar.gz → releases/POE-Component-SimpleDBI-1.14.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.15.tar.gz → releases/POE-Component-SimpleDBI-1.15.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.16.tar.gz → releases/POE-Component-SimpleDBI-1.16.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.17.tar.gz → releases/POE-Component-SimpleDBI-1.17.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.18.tar.gz → releases/POE-Component-SimpleDBI-1.18.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.19.tar.gz → releases/POE-Component-SimpleDBI-1.19.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.20.tar.gz → releases/POE-Component-SimpleDBI-1.20.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.21.tar.gz → releases/POE-Component-SimpleDBI-1.21.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.22.tar.gz → releases/POE-Component-SimpleDBI-1.22.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.23.tar.gz → releases/POE-Component-SimpleDBI-1.23.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.24.tar.gz → releases/POE-Component-SimpleDBI-1.24.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.25.tar.gz → releases/POE-Component-SimpleDBI-1.25.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.26.tar.gz → releases/POE-Component-SimpleDBI-1.26.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.27.tar.gz → releases/POE-Component-SimpleDBI-1.27.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.28.tar.gz → releases/POE-Component-SimpleDBI-1.28.tar.gz
File renamed without changes
View
0  POE-Component-SimpleDBI-1.29.tar.gz → releases/POE-Component-SimpleDBI-1.29.tar.gz
File renamed without changes
View
18 t/1_load.t
@@ -1,18 +0,0 @@
-#!/usr/bin/perl
-use strict; use warnings;
-
-my $numtests;
-BEGIN {
- $numtests = 2;
-
- eval "use Test::NoWarnings";
- if ( ! $@ ) {
- # increment by one
- $numtests++;
-
- }
-}
-
-use Test::More tests => $numtests;
-use_ok( 'POE::Component::SimpleDBI::SubProcess' );
-use_ok( 'POE::Component::SimpleDBI' );
View
14 t/apocalypse.t
@@ -1,14 +0,0 @@
-#!/usr/bin/perl
-use strict; use warnings;
-
-use Test::More;
-eval "use Test::Apocalypse";
-if ( $@ ) {
- plan skip_all => 'Test::Apocalypse required for validating the distribution';
-} else {
- require Test::NoWarnings; require Test::Pod; require Test::Pod::Coverage; # lousy hack for kwalitee
- is_apocalypse_here( {
- # Add PERL_APOCALYSPE env var so we can test everything when needed...
- ! $ENV{PERL_APOCALYPSE} ? ( deny => qr/^(?:OutdatedPrereqs|ModuleUsed|Strict|Pod_(?:Spelling|Coverage))$/, ) : (),
- } );
-}
Please sign in to comment.
Something went wrong with that request. Please try again.