1POE::Component::SimpleDUBsIe(r3)Contributed Perl DocumenPtOaEt:i:oCnomponent::SimpleDBI(3)
2
3
4

NAME

6       POE::Component::SimpleDBI - Asynchronous non-blocking DBI calls in POE
7       made simple
8

SYNOPSIS

10               use POE;
11               use POE::Component::SimpleDBI;
12
13               # Create a new session with the alias we want
14               POE::Component::SimpleDBI->new( 'SimpleDBI' ) or die 'Unable to create the DBI session';
15
16               # Create our own session to communicate with SimpleDBI
17               POE::Session->create(
18                       inline_states => {
19                               _start => sub {
20                                       # Tell SimpleDBI to connect
21                                       $_[KERNEL]->post( 'SimpleDBI', 'CONNECT',
22                                               'DSN'           =>      'DBI:mysql:database=foobaz;host=192.168.1.100;port=3306',
23                                               'USERNAME'      =>      'FooBar',
24                                               'PASSWORD'      =>      'SecretPassword',
25                                               'EVENT'         =>      'conn_handler',
26                                       );
27
28                                       # Execute a query and return number of rows affected
29                                       $_[KERNEL]->post( 'SimpleDBI', 'DO',
30                                               'SQL'           =>      'DELETE FROM FooTable WHERE ID = ?',
31                                               'PLACEHOLDERS'  =>      [ qw( 38 ) ],
32                                               'EVENT'         =>      'deleted_handler',
33                                               'INSERT_ID'     =>      0,
34                                       );
35
36                                       # Retrieve one row of information
37                                       $_[KERNEL]->post( 'SimpleDBI', 'SINGLE',
38                                               'SQL'           =>      'Select * from FooTable LIMIT 1',
39                                               'EVENT'         =>      'success_handler',
40                                               'BAGGAGE'       =>      'Some Stuff I want to keep!',
41                                       );
42
43                                       # We want many rows of information + get the query ID so we can delete it later
44                                       # Furthermore, disable prepare_cached on this query
45                                       my $id = $_[KERNEL]->call( 'SimpleDBI', 'MULTIPLE',
46                                               'SQL'           =>      'SELECT foo, baz FROM FooTable2 WHERE id = ?',
47                                               'PLACEHOLDERS'  =>      [ qw( 53 ) ],
48                                               'EVENT'         =>      'multiple_handler',
49                                               'PREPARE_CACHED'=>      0,
50                                       );
51
52                                       # Quote something and send it to another session
53                                       $_[KERNEL]->post( 'SimpleDBI', 'QUOTE',
54                                               'SQL'           =>      'foo$*@%%sdkf"""',
55                                               'SESSION'       =>      'OtherSession',
56                                               'EVENT'         =>      'quote_handler',
57                                       );
58
59                                       # Changed our mind!
60                                       $_[KERNEL]->post( 'SimpleDBI', 'Delete_Query', $id );
61
62                                       # 3 ways to shutdown
63
64                                       # This will let the existing queries finish, then shutdown
65                                       $_[KERNEL]->post( 'SimpleDBI', 'shutdown' );
66
67                                       # This will terminate when the event traverses
68                                       # POE's queue and arrives at SimpleDBI
69                                       $_[KERNEL]->post( 'SimpleDBI', 'shutdown', 'NOW' );
70
71                                       # Even QUICKER shutdown :)
72                                       $_[KERNEL]->call( 'SimpleDBI', 'shutdown', 'NOW' );
73                               },
74
75                               # Define your request handlers here
76                               'quote_handler' =>      \&FooHandler,
77                               # And so on
78                       },
79               );
80

ABSTRACT

82               This module simplifies DBI usage in POE's multitasking world.
83
84               This module is a breeze to use, you'll have DBI calls in your POE program
85               up and running in only a few seconds of setup.
86
87               This module does what XML::Simple does for the XML world.
88
89               If you want more advanced usage, check out:
90                       POE::Component::LaDBI
91

DESCRIPTION

93       This module works its magic by creating a new session with POE, then
94       spawning off a child process to do the "heavy" lifting. That way, your
95       main POE process can continue servicing other clients.  Queries are put
96       into a queue, and processed one at a time.
97
98       The standard way to use this module is to do this:
99
100               use POE;
101               use POE::Component::SimpleDBI;
102
103               POE::Component::SimpleDBI->new( ... );
104
105               POE::Session->create( ... );
106
107               POE::Kernel->run();
108
109   Starting SimpleDBI
110       To start SimpleDBI, just call it's new method:
111
112               POE::Component::SimpleDBI->new( 'ALIAS' );
113
114       This method will die on error or return success.
115
116       NOTE: The act of starting/stopping SimpleDBI fires off _child events,
117       read the POE documentation on what to do with them :)
118
119       This constructor accepts only 2 arguments.
120
121       Alias
122
123       This sets the session alias in POE.
124
125       The default is "SimpleDBI".
126
127       PREPARE_CACHED
128
129       This sets the global PREPARE_CACHED setting. This is a boolean value.
130
131               POE::Component::SimpleDBI->new( 'ALIAS', 0 );
132
133       The default is enabled.
134
135   Commands
136       There are a few commands you can trigger in SimpleDBI. They are
137       triggered via $_[KERNEL]->post( ... );
138
139       ID
140
141       All of the commands except for Delete_Query and shutdown return an id.
142       To get them, do this:      my $id = $_[KERNEL]->call( 'SimpleDBI', ...
143       );
144
145       Afterwards, the id can be used to delete queries, look at Delete_Query
146       for more information.
147
148       Argument errors
149
150       All of the commands validate their arguments, and if an error happens (
151       missing argument, etc ), they will do either:      - return undef and
152       forget that your request even existed      - post to the SESSION/EVENT
153       with ERROR present in the data           NOTE: The data will not have
154       an ID key present
155
156       Explanation of DO/SINGLE/MULTIPLE/QUOTE arguments
157
158       They are passed in via the $_[KERNEL]->post( ... );
159
160       NOTE: Capitalization is very important!
161
162       "SQL"
163           This is the actual SQL line you want SimpleDBI to execute.  You can
164           put in placeholders, this module supports them.
165
166       "PLACEHOLDERS"
167           This is an array of placeholders.
168
169           You can skip this if your query does not utilize it.
170
171       "SESSION"
172           This is the session that will get the result
173
174           You can skip this, it defaults to the sending session
175
176       "EVENT"
177           This is the event, triggered whenever a query finished.
178
179           It will get a hash in ARG0, consult the specific queries on what
180           you will get.
181
182           NOTE: If the key 'ERROR' exists in the hash, then it will contain
183           the error string.
184
185       "BAGGAGE"
186           This is a special argument, you can "attach" any kind of baggage to
187           a query.  The baggage will be kept by SimpleDBI and returned to the
188           Event handler intact.
189
190           This is good for storing data associated with a query like a client
191           object, etc.
192
193           You can skip this if your query does not utilize it.
194
195       "PREPARE_CACHED"
196           This was added recently, to override SimpleDBI's default behavior
197           of using the $dbh->prepare_cached() function. Setting this to false
198           will use $dbh->prepare() instead.
199
200           Some users reported problems with PostgreSQL. After investigation,
201           this turned out to be some bizarre OID caching issues when the
202           table was updated while the connection is alive.  The quick work-
203           around is to reconnect to the database, but this was not a "sane"
204           solution.
205
206           This is a simple boolean value, and if this argument does not
207           exist, SimpleDBI will use the global setting when calling new().
208
209       "INSERT_ID"
210           This was added recently, to override SimpleDBI's default behavior
211           of using the $dbh->last_insert_id() function. Setting this to false
212           will disable retrieval of this value.
213
214           This is a simple boolean value, and if this argument does not
215           exist, SimpleDBI will default to true.
216
217       "CONNECT"
218
219               This tells SimpleDBI to connect to the database
220
221               NOTE: if we are already connected, it will be a success ( SimpleDBI will not disconnect then connect automatically )
222
223               Accepted arguments:
224                       DSN             ->      The DBI DSN string, consult the DBI docs on what this is
225                       USERNAME        ->      The username for the connection
226                       PASSWORD        ->      The password for the connection
227                       SESSION         ->      The session to send the results
228                       EVENT           ->      The event to send the results
229                       NOW             ->      Tells SimpleDBI to bypass the queue and connect NOW!
230                       CLEAR           ->      Tells SimpleDBI to clear the queue and connect NOW!
231                       AUTO_COMMIT     ->      The boolean value we will pass to DBI->connect ( defaults to true )
232
233               NOTE: if the DSN/USERNAME/PASSWORD/SESSION/EVENT does not exist, SimpleDBI assumes you wanted to use
234               the old connection and will use the cached values ( if you told it to DISCONNECT ).
235
236               Here's an example on how to trigger this event:
237
238               $_[KERNEL]->post( 'SimpleDBI', 'CONNECT',
239                       'DSN'           =>      'DBI:mysql:database=foobaz;host=192.168.1.100;port=3306',
240                       'USERNAME'      =>      'MyUser',
241                       'PASSWORD'      =>      'MyPassword',
242                       'EVENT'         =>      'conn_handler',
243                       'NOW'           =>      1,
244               );
245
246               The NOW/CLEAR arguments are special, they will tell SimpleDBI to bypass the request queue and connect NOW...
247                       The CLEAR argument will also delete all the requests waiting in the queue, they will get an ERROR result
248                       They both default to false, supply a boolean value to turn them on
249
250               The Event handler will get a hash in ARG0:
251               {
252                       'ERROR'         =>      exists only if an error occured
253                       'GONE'          =>      exists only if the server was disconnected and the reconnect failed
254                       'ACTION'        =>      'CONNECT'
255                       'ID'            =>      ID of the Query
256                       'EVENT'         =>      The event the query will respond to
257                       'SESSION'       =>      The session the query will respond to
258               }
259
260               Receiving this event without the ERROR key means SimpleDBI successfully connected and is waiting for queries
261
262               NOTE: You can do nifty things like:
263                       $_[KERNEL]->post( 'SimpleDBI', 'CONNECT', 'DSN' => 'DBI:mysql:...', ... );
264                       $_[KERNEL]->post( 'SimpleDBI', 'DO', ... );
265                       $_[KERNEL]->post( 'SimpleDBI', 'SINGLE', ... );
266                       $_[KERNEL]->post( 'SimpleDBI', 'DISCONNECT' );
267                       $_[KERNEL]->post( 'SimpleDBI', 'CONNECT', 'DSN' => 'DBI:oracle:...', ... );
268                       $_[KERNEL]->post( 'SimpleDBI', 'MULTIPLE', ... );
269                       $_[KERNEL]->post( 'SimpleDBI', 'shutdown' );
270
271               They all will be executed in the right order!
272
273               As of 1.11 SimpleDBI now detects whether the backend lost the connection to the database server. The backend will
274               automatically reconnect if it happens, but if that fails, an error will be sent to the session/event specified here
275               with an extra key: 'GONE'. In this state SimpleDBI is deadlocked, any new queries will not be processed until a
276               CONNECT NOW event is issued! Keep in mind the SINGLE/etc queries WILL NOT receive an error if this happens, the error
277               goes straight to the CONNECT handler to keep it simple!
278
279       "DISCONNECT"
280
281               This tells SimpleDBI to disconnect from the database
282
283               NOTE: In the case that a DISCONNECT is issued when we are not connected, it will still succeed...
284
285               Accepted arguments:
286                       SESSION         ->      The session to send the results
287                       EVENT           ->      The event to send the results
288                       NOW             ->      Tells SimpleDBI to bypass the queue and disconnect NOW!
289                       CLEAR           ->      Tells SimpleDBI to clear the queue and disconnect NOW!
290
291               Here's an example on how to trigger this event:
292
293               $_[KERNEL]->post( 'SimpleDBI', 'DISCONNECT',
294                       'EVENT'         =>      'disconn_handler',
295                       'NOW'           =>      1,
296               );
297
298               The NOW/CLEAR arguments are special, they will tell SimpleDBI to bypass the request queue and connect NOW...
299                       The CLEAR argument will also delete all the requests waiting in the queue, they will get an ERROR result
300                       They both default to false, supply a boolean value to turn them on
301
302               The Event handler will get a hash in ARG0:
303               {
304                       'ERROR'         =>      exists only if an error occured
305                       'ACTION'        =>      'DISCONNECT'
306                       'ID'            =>      ID of the Query
307                       'EVENT'         =>      The event the query will respond to
308                       'SESSION'       =>      The session the query will respond to
309               }
310
311               Receiving this event without the ERROR key means SimpleDBI successfully disconnected
312
313               BEWARE: There is the possibility of a deadlock:
314                       $_[KERNEL]->post( 'SimpleDBI', 'CONNECT', ... );
315                       $_[KERNEL]->post( 'SimpleDBI', 'MULTIPLE', ... );
316                       $_[KERNEL]->post( 'SimpleDBI', 'DISCONNECT' );
317                       $_[KERNEL]->post( 'SimpleDBI', 'DO', ... );
318                       $_[KERNEL]->post( 'SimpleDBI', 'SINGLE', ... );
319                       $_[KERNEL]->post( 'SimpleDBI', 'CONNECT' );
320
321               In this case, the DO/SINGLE queries will NEVER run until you issue a CONNECT with NOW enabled
322
323       "QUOTE"
324
325               This simply sends off a string to be quoted, and gets it back.
326
327               Accepted arguments:
328                       SESSION         ->      The session to send the results
329                       EVENT           ->      The event to send the results
330                       SQL             ->      The string to be quoted
331                       BAGGAGE         ->      Any extra data to keep associated with this query ( SimpleDBI will not touch it )
332
333               Internally, it does this:
334
335               return $dbh->quote( $SQL );
336
337               Here's an example on how to trigger this event:
338
339               $_[KERNEL]->post( 'SimpleDBI', 'QUOTE',
340                       SQL => 'foo$*@%%sdkf"""',
341                       EVENT => 'quote_handler',
342               );
343
344               The Event handler will get a hash in ARG0:
345               {
346                       'ERROR'         =>      exists only if an error occured
347                       'ACTION'        =>      'QUOTE'
348                       'ID'            =>      ID of the Query
349                       'EVENT'         =>      The event the query will respond to
350                       'SESSION'       =>      The session the query will respond to
351                       'SQL'           =>      Original SQL inputted
352                       'RESULT'        =>      The quoted SQL
353                       'PLACEHOLDERS'  =>      Original placeholders ( may not exist if it was not provided )
354                       'BAGGAGE'       =>      whatever you set it to ( may not exist if it was not provided )
355               }
356
357       "DO"
358
359               This query is specialized for those queries where you UPDATE/DELETE/INSERT/etc.
360
361               THIS IS NOT FOR SELECT QUERIES!
362
363               Accepted arguments:
364                       SESSION         ->      The session to send the results
365                       EVENT           ->      The event to send the results
366                       SQL             ->      The string to be quoted
367                       PLACEHOLDERS    ->      Any placeholders ( if needed )
368                       BAGGAGE         ->      Any extra data to keep associated with this query ( SimpleDBI will not touch it )
369                       PREPARE_CACHED  ->      Boolean value ( if needed )
370                       INSERT_ID       ->      Boolean value ( if needed )
371
372               Internally, it does this:
373
374               $sth = $dbh->prepare_cached( $SQL );
375               $rows_affected = $sth->execute( $PLACEHOLDERS );
376               return $rows_affected;
377
378               Here's an example on how to trigger this event:
379
380               $_[KERNEL]->post( 'SimpleDBI', 'DO',
381                       SQL => 'DELETE FROM FooTable WHERE ID = ?',
382                       PLACEHOLDERS => [ 38 ],
383                       EVENT => 'deleted_handler',
384               );
385
386               The Event handler will get a hash in ARG0:
387               {
388                       'ERROR'         =>      exists only if an error occured
389                       'ACTION'        =>      'DO'
390                       'ID'            =>      ID of the Query
391                       'EVENT'         =>      The event the query will respond to
392                       'SESSION'       =>      The session the query will respond to
393                       'SQL'           =>      Original SQL inputted
394                       'RESULT'        =>      Scalar value of rows affected
395                       'PLACEHOLDERS'  =>      Original placeholders ( may not exist if it was not provided )
396                       'BAGGAGE'       =>      whatever you set it to ( may not exist if it was not provided )
397                       'INSERTID'      =>      The insert ID - using $dbh->last_insert_id( undef, undef, undef, undef ) [ defaults to undef ]
398               }
399
400       "SINGLE"
401
402               This query is specialized for those queries where you will get exactly 1 result back.
403
404               Accepted arguments:
405                       SESSION         ->      The session to send the results
406                       EVENT           ->      The event to send the results
407                       SQL             ->      The string to be quoted
408                       PLACEHOLDERS    ->      Any placeholders ( if needed )
409                       BAGGAGE         ->      Any extra data to keep associated with this query ( SimpleDBI will not touch it )
410                       PREPARE_CACHED  ->      Boolean value ( if needed )
411
412               XXX Beware! I incorrectly stated that this returns lowercase rows, this is not true! XXX
413
414               Internally, it does this:
415
416               $sth = $dbh->prepare_cached( $SQL );
417               $sth->execute( $PLACEHOLDERS );
418               $result = $sth->fetchrow_hashref;
419               return $result;
420
421               Here's an example on how to trigger this event:
422
423               $_[KERNEL]->post( 'SimpleDBI', 'SINGLE',
424                       SQL => 'Select * from FooTable',
425                       EVENT => 'success_handler',
426                       SESSION => 'MySession',
427               );
428
429               The Event handler will get a hash in ARG0:
430               {
431                       'ERROR'         =>      exists only if an error occured
432                       'ACTION'        =>      'SINGLE'
433                       'ID'            =>      ID of the Query
434                       'EVENT'         =>      The event the query will respond to
435                       'SESSION'       =>      The session the query will respond to
436                       'SQL'           =>      Original SQL inputted
437                       'RESULT'        =>      Hash of columns - similar to fetchrow_hashref ( undef if no rows returned )
438                       'PLACEHOLDERS'  =>      Original placeholders ( may not exist if it was not provided )
439                       'BAGGAGE'       =>      whatever you set it to ( may not exist if it was not provided )
440               }
441
442       "MULTIPLE"
443
444               This query is specialized for those queries where you will get more than 1 result back.
445
446               XXX Keep in mind: the column names are all lowercased automatically! XXX
447
448               Accepted arguments:
449                       SESSION         ->      The session to send the results
450                       EVENT           ->      The event to send the results
451                       SQL             ->      The string to be quoted
452                       PLACEHOLDERS    ->      Any placeholders ( if needed )
453                       BAGGAGE         ->      Any extra data to keep associated with this query ( SimpleDBI will not touch it )
454                       PREPARE_CACHED  ->      Boolean value ( if needed )
455
456               Internally, it does this:
457
458               $sth = $dbh->prepare_cached( $SQL );
459               $sth->execute( $PLACEHOLDERS );
460               $sth->bind_columns( \( @$newdata{ @{ $sth->{'NAME_lc'} } } ) );
461               while ( $sth->fetch() ) {
462                       push( @results, { @$newdata } );
463               }
464               return \@results;
465
466               Here's an example on how to trigger this event:
467
468               $_[KERNEL]->post( 'SimpleDBI', 'MULTIPLE',
469                       SQL => 'SELECT foo, baz FROM FooTable2 WHERE id = ?',
470                       EVENT => 'multiple_handler',
471                       PLACEHOLDERS => [ 53 ],
472                       PREPARE_CACHED => 0,
473               );
474
475               The Event handler will get a hash in ARG0:
476               {
477                       'ERROR'         =>      exists only if an error occured
478                       'ACTION'        =>      'MULTIPLE'
479                       'ID'            =>      ID of the Query
480                       'EVENT'         =>      The event the query will respond to
481                       'SESSION'       =>      The session the query will respond to
482                       'SQL'           =>      Original SQL inputted
483                       'RESULT'        =>      Array of hash of columns - similar to array of fetchrow_hashref's ( undef if no rows returned )
484                       'PLACEHOLDERS'  =>      Original placeholders ( may not exist if it was not provided )
485                       'BAGGAGE'       =>      whatever you set it to ( may not exist if it was not provided )
486               }
487
488       "ATOMIC"
489
490               This query is specialized for those queries that you need to execute in a transaction. You supply an array of SQL queries,
491               and SimpleDBI will execute them all in a transaction block. No need to worry about AutoCommit, BEGIN, and END TRANSACTION!
492
493               You are supposed to pass an array of queries that normally would be executed in a DO-style query. Again, you cannot execute
494               SELECT queries in this type of command! Currently there is no control over prepare_cached for individual queries. It may be
495               added in a future release.
496
497               WARNING: It tripped me up on my testing when I realized this worked on Postgres but not MySQL. I forgot that I was testing
498               against MyISAM tables, which doesn't support transactions! ( it works nicely on InnoDB tables hah ) So, if this doesn't
499               "behave" properly for you please check your database tables!
500
501               Accepted arguments:
502                       SESSION         ->      The session to send the results
503                       EVENT           ->      The event to send the results
504                       SQL             ->      The array of SQL queries
505                       PLACEHOLDERS    ->      The array of placeholders ( if needed ) [ this is an AoA - array of arrays! ]
506                       BAGGAGE         ->      Any extra data to keep associated with this query ( SimpleDBI will not touch it )
507                       PREPARE_CACHED  ->      Boolean value ( if needed ) [ for all of the queries! ]
508
509               Internally, it does this:
510
511               eval {
512                       $dbh->begin_work;
513                       for my $idx ( 0 .. $#array ) {
514                               if ( $prepare_cached ) {
515                                       $sth = $dbh->prepare_cached( $array[ $idx ] );
516                               } else {
517                                       $sth = $dbh->prepare( $array[ $idx ] );
518                               }
519                               if ( defined $PLACEHOLDERS[ $idx ] ) {
520                                       $sth->execute( $PLACEHOLDERS[ $idx ] );
521                               } else {
522                                       $sth->execute;
523                               }
524                               $sth->finish;
525                       }
526                       $dbh->commit;
527               };
528               if ( $@ ) {
529                       eval { $dbh->rollback };
530                       if ( $@ ) {
531                               return ROLLBACK_FAILURE;
532                       } else {
533                               return COMMIT_FAILURE:
534                       }
535               } else {
536                       return SUCCESS;
537               }
538
539               Here's an example on how to trigger this event:
540               $_[KERNEL]->post( 'SimpleDBI', 'ATOMIC',
541                       SQL => [
542                               'DELETE FROM FooTable WHERE ID = ?',
543                               'UPDATE FooTable SET baz = ? WHERE bar = ?',
544                       ],
545                       EVENT => 'atomic_handler',
546                       PLACEHOLDERS => [       [ 53 ],
547                                               [ 5, 86 ]
548                       ],
549               );
550
551               The Event handler will get a hash in ARG0:
552               {
553                       'ERROR'         =>      exists only if an error occured ( ROLLBACK_FAILURE or COMMIT_FAILURE with explanation )
554                       'ACTION'        =>      'ATOMIC'
555                       'ID'            =>      ID of the Query
556                       'EVENT'         =>      The event the query will respond to
557                       'SESSION'       =>      The session the query will respond to
558                       'SQL'           =>      Original SQL array inputted
559                       'RESULT'        =>      Either SUCCESS or in case of error, not exists
560                       'PLACEHOLDERS'  =>      Original placeholders ( may not exist if it was not provided )
561                       'BAGGAGE'       =>      whatever you set it to ( may not exist if it was not provided )
562               }
563
564       "Delete_Query"
565
566               Call this event if you want to delete a query via the ID.
567
568               Returns:
569                       undef if it wasn't able to find the ID
570                       0 if the query is currently being processed
571                       1 if the query was successfully deleted
572
573               Here's an example on how to trigger this event:
574
575               $_[KERNEL]->post( 'SimpleDBI', 'Delete_Query', $queryID );
576
577               IF you really want to know the status, execute a call on the event and check the returned value.
578
579       "Clear_Queue"
580
581               This event will clear the entire queue except the running query, if there is one.
582
583               You can also pass in one argument -> the error string to be used instead of the default, 'Cleared the queue'
584
585               All the queries in the queue will return ERROR to their respective sessions/events
586
587       "shutdown"
588
589               $_[KERNEL]->post( 'SimpleDBI', 'shutdown' );
590
591               This will signal SimpleDBI to start the shutdown procedure.
592
593               NOTE: This will let all outstanding queries run!
594               SimpleDBI will kill it's session when all the queries have been processed.
595
596               you can also specify an argument:
597
598               $_[KERNEL]->post( 'SimpleDBI', 'shutdown', 'NOW' );
599
600               This will signal SimpleDBI to shutdown.
601
602               NOTE: This will NOT let the outstanding queries finish!
603               Any queries running will be lost!
604
605               Due to the way POE's queue works, this shutdown event will take some time to propagate POE's queue.
606               If you REALLY want to shut down immediately, do this:
607
608               $_[KERNEL]->call( 'SimpleDBI', 'shutdown', 'NOW' );
609
610   SimpleDBI Notes
611       This module is very picky about capitalization!
612
613       All of the options are uppercase, to avoid confusion.
614
615       You can enable debugging mode by doing this:
616
617               sub POE::Component::SimpleDBI::DEBUG () { 1 }
618               use POE::Component::SimpleDBI;
619
620       Also, this module will try to keep the SubProcess alive.  if it dies,
621       it will open it again for a max of 5 retries.
622
623       You can override this behavior by doing this:
624
625               sub POE::Component::SimpleDBI::MAX_RETRIES () { 10 }
626               use POE::Component::SimpleDBI;
627
628   EXPORT
629       Nothing.
630

SEE ALSO

632       DBI
633
634       POE::Component::DBIAgent
635
636       POE::Component::LaDBI
637
638       POE::Component::EasyDBI
639

SUPPORT

641       You can find documentation for this module with the perldoc command.
642
643           perldoc POE::Component::SimpleDBI
644
645   Websites
646       ·   AnnoCPAN: Annotated CPAN documentation
647
648           http://annocpan.org/dist/POE-Component-SimpleDBI
649           <http://annocpan.org/dist/POE-Component-SimpleDBI>
650
651       ·   CPAN Ratings
652
653           http://cpanratings.perl.org/d/POE-Component-SimpleDBI
654           <http://cpanratings.perl.org/d/POE-Component-SimpleDBI>
655
656       ·   RT: CPAN's request tracker
657
658           http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-SimpleDBI
659           <http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-SimpleDBI>
660
661       ·   Search CPAN
662
663           http://search.cpan.org/dist/POE-Component-SimpleDBI
664           <http://search.cpan.org/dist/POE-Component-SimpleDBI>
665
666       ·   CPAN::Forum
667
668           http://www.cpanforum.com/dist/POE-Component-SimpleDBI
669           <http://www.cpanforum.com/dist/POE-Component-SimpleDBI>
670
671   Bugs
672       Please report any bugs or feature requests to
673       "bug-poe-component-simpledbi at rt.cpan.org", or through the web
674       interface at
675       http://rt.cpan.org/NoAuth/ReportBug.html?Queue=POE-Component-SimpleDBI
676       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=POE-Component-
677       SimpleDBI>.  I will be notified, and then you'll automatically be
678       notified of progress on your bug as I make changes.
679
680   Code Repository
681       This code is currently hosted on github.com under the account
682       "apocalypse". Please feel free to browse it and pull from it, or
683       whatever. If you want to contribute patches, please send me a diff or
684       prod me to pull from your repository :)
685
686       http://github.com/apocalypse/perl-poe-simpledbi/tree/master
687       <http://github.com/apocalypse/perl-poe-simpledbi/tree/master>
688

AUTHOR

690       Apocalypse <apocal@cpan.org>
691
693       Copyright 2009 by Apocalypse
694
695       This library is free software; you can redistribute it and/or modify it
696       under the same terms as Perl itself.
697
698
699
700perl v5.12.0                      2009-03-11      POE::Component::SimpleDBI(3)
Impressum