David R. Baird > Class-DBI-FormBuilder-Plugin-Time-Piece-0.1 > Class::DBI::FormBuilder::Plugin::Time::Piece

Download:
Class-DBI-FormBuilder-Plugin-Time-Piece-0.1.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.1   Source  

NAME ^

Class::DBI::FormBuilder::Plugin::Time::Piece - Output Dates/Times Properly

SYNOPSIS ^

  Class::DBI::FormBuilder::Plugin::Time::Piece-E<gt>require;
  my $ok = Class::DBI::FormBuilder::Plugin::Time::Piece-E<gt>field($obj,$form,$column);

DESCRIPTION ^

This module is loaded implicitly by CDBI::FormBuilder <= 0.32, when it encounters a Time::Piece object as a has_a field within a Class::DBI object/class. When that happens, Class::DBI::FormBuilder::Plugin::Time::Piece->field($obj,$form,$column) is called.

my $ok = $class->field($obj,$form,$column)

This routine will accept the object for which a form is being created, the CGI::FormBuilder object we're working with, and the field in question. field() is then expected to call (and return the return value of) $form->field(%args). As a result, a text field will be created within the form.

At this point, CDBI::FB::Plugin::Time::Piece serializes itself based upon MySQL types. Patches are most welcome!

WARNING ^

We call column_type() on $obj, so it must be a Class::DBI::mysql object, or it needs to have used Class::DBI::Plugin::Type.

SEE ALSO ^

Class::DBI, CGI::FormBuilder, Class::DBI::FormBuilder

AUTHOR ^

James Tolley, <james@bitperfect.com>

COPYRIGHT AND LICENSE ^

Copyright (C) 2005 by James Tolley

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.