From: David Kamholz Date: Sat, 10 Dec 2005 16:25:12 +0000 (+0000) Subject: item => head2 in docs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=130c64391b48bae9eb374e931c7d6c308625bf6b;p=dbsrgits%2FDBIx-Class-Historic.git item => head2 in docs --- diff --git a/lib/DBIx/Class/AccessorGroup.pm b/lib/DBIx/Class/AccessorGroup.pm index 03ec899..9a2dd11 100644 --- a/lib/DBIx/Class/AccessorGroup.pm +++ b/lib/DBIx/Class/AccessorGroup.pm @@ -16,8 +16,6 @@ getters and setters. =head1 METHODS -=over 4 - =cut sub mk_group_accessors { @@ -146,8 +144,6 @@ sub set_simple { 1; -=back - =head1 AUTHORS Matt S. Trout diff --git a/lib/DBIx/Class/CDBICompat.pm b/lib/DBIx/Class/CDBICompat.pm index 5fb1af4..4d0d412 100644 --- a/lib/DBIx/Class/CDBICompat.pm +++ b/lib/DBIx/Class/CDBICompat.pm @@ -124,7 +124,6 @@ This class implements the trigger functionality. =back - =head1 AUTHORS Matt S. Trout diff --git a/lib/DBIx/Class/DB.pm b/lib/DBIx/Class/DB.pm index 03c0985..c2326ef 100644 --- a/lib/DBIx/Class/DB.pm +++ b/lib/DBIx/Class/DB.pm @@ -31,18 +31,15 @@ This class provides a simple way of specifying a database connection. =head1 METHODS -=over 4 +=head2 storage +Sets or gets the storage backend. Defaults to L. -=item storage +=head2 class_resolver -Which storage backend to be used. Defaults to L - -=item class_resolver - -Which class to use for resolving a class. Defaults to -L, which returns whatever you throw -at it. See resolve_class below. +Sets or gets the class to use for resolving a class. Defaults to +L, which returns whatever you give +it. See resolve_class below. =cut @@ -50,7 +47,7 @@ __PACKAGE__->mk_classdata('storage'); __PACKAGE__->mk_classdata('class_resolver' => 'DBIx::Class::ClassResolver::PassThrough'); -=item connection +=head2 connection __PACKAGE__->connection($dsn, $user, $pass, $attrs); @@ -66,21 +63,17 @@ sub connection { $class->storage($storage); } -=item dbi_commit - - $class->dbi_commit; +=head2 dbi_commit -Issues a commit again the current dbh +Issues a commit against the current dbh. =cut sub dbi_commit { $_[0]->storage->commit; } -=item dbi_rollback +=head2 dbi_rollback - $class->dbi_rollback; - -Issues a rollback again the current dbh +Issues a rollback against the current dbh. =cut @@ -90,8 +83,6 @@ sub resolve_class { return shift->class_resolver->class(@_); } 1; -=back - =head1 AUTHORS Matt S. Trout diff --git a/lib/DBIx/Class/Exception.pm b/lib/DBIx/Class/Exception.pm index 40426ad..0580202 100644 --- a/lib/DBIx/Class/Exception.pm +++ b/lib/DBIx/Class/Exception.pm @@ -31,13 +31,11 @@ $DBix::Class::Exception::DBIC_EXCEPTION_CLASS =head1 METHODS -=over 4 +=head2 throw( $message ) -=item throw( $message ) +=head2 throw( message => $message ) -=item throw( message => $message ) - -=item throw( error => $error ) +=head2 throw( error => $error ) Throws a fatal exception. @@ -54,8 +52,6 @@ sub throw { Carp::croak($message); } -=back - =head1 AUTHOR Marcus Ramberg diff --git a/lib/DBIx/Class/Manual.pod b/lib/DBIx/Class/Manual.pod index f95b8aa..0b6c556 100644 --- a/lib/DBIx/Class/Manual.pod +++ b/lib/DBIx/Class/Manual.pod @@ -11,26 +11,22 @@ from your SQL database. =head1 SECTIONS -=over 4 - -=item L +=head2 L A beginner's introduction to using the native DBIx::Class interface -=item L +=head2 L Convenient reciepes for DBIC usage. -=item L +=head2 L Frequently asked questions about DBIC. -=item L +=head2 L Got trouble? Let us shoot it for you. -=back - If you're using the CDBI Compat layer, we suggest reading the L documentation. It should behave the same way. diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index c168ba4..57c2175 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -8,11 +8,11 @@ Things that could be handy =head1 RECIPES -=item Input validation. +=head2 Input validation. -=item Using joins +=head2 Using joins -=item Many-to-many relationships +=head2 Many-to-many relationships This is not as easy as it could be, but it's possible. Here's an example to illustrate: @@ -78,8 +78,8 @@ illustrate: # book2author table equals the bookID of the books (using the bookID # relationship table -=item Advanced Exception handling +=head2 Advanced Exception handling -=item Transactions +=head2 Transactions =back diff --git a/lib/DBIx/Class/Manual/FAQ.pod b/lib/DBIx/Class/Manual/FAQ.pod index b20eded..5da03cc 100644 --- a/lib/DBIx/Class/Manual/FAQ.pod +++ b/lib/DBIx/Class/Manual/FAQ.pod @@ -4,21 +4,17 @@ DBIx::Class::Manual::FAQ - Frequently Asked Questions =head1 QUESTIONS -=over 4 +=head2 What is the point of this module? Is it a fork of Class::DBI? -=item What is the point of this module? Is it a fork of Class::DBI? +=head2 Who's the intended audience for this module? -=item Who's the intended audience for this module? +=head2 What databases does it support? -=item What databases does it support? +=head2 What's the current status of this module? -=item What's the current status of this module? +=head2 What's planned in the future? -=item What's planned in the future? - -=item Where can I go for support? - -=back +=head2 Where can I go for support? =cut diff --git a/lib/DBIx/Class/Manual/Troubleshooting.pod b/lib/DBIx/Class/Manual/Troubleshooting.pod index 029eb81..5dd88a7 100644 --- a/lib/DBIx/Class/Manual/Troubleshooting.pod +++ b/lib/DBIx/Class/Manual/Troubleshooting.pod @@ -2,11 +2,7 @@ DBIx::Class::Manual::Troubleshooting - Got a problem? Shoot it. -=over 4 - -=item "Can't locate storage blabla" - -=back +=head2 "Can't locate storage blabla" =cut diff --git a/lib/DBIx/Class/ObjectCache.pm b/lib/DBIx/Class/ObjectCache.pm index f37d439..3dd8ec0 100644 --- a/lib/DBIx/Class/ObjectCache.pm +++ b/lib/DBIx/Class/ObjectCache.pm @@ -14,7 +14,7 @@ __PACKAGE__->mk_classdata('cache'); =head1 SYNOPSIS # in your class definition - use Cache::FastMmmap; + use Cache::FastMmap; __PACKAGE__->cache(Cache::FastMmap->new); =head1 DESCRIPTION @@ -99,7 +99,7 @@ sub _insert_into_cache { =head1 AUTHORS -David Kamholz +David Kamholz =head1 LICENSE diff --git a/lib/DBIx/Class/PK.pm b/lib/DBIx/Class/PK.pm index b532a33..eb15f32 100644 --- a/lib/DBIx/Class/PK.pm +++ b/lib/DBIx/Class/PK.pm @@ -21,8 +21,6 @@ and depending on them. =head1 METHODS -=over 4 - =cut sub _ident_cond { @@ -35,7 +33,7 @@ sub _ident_values { return (map { $self->{_column_data}{$_} } keys %{$self->_primaries}); } -=item set_primary_key <@cols> +=head2 set_primary_key <@cols> define one or more columns as primary key for this class @@ -53,7 +51,7 @@ sub set_primary_key { $class->_primaries(\%pri); } -=item find +=head2 find Finds columns based on the primary key(s). @@ -86,7 +84,7 @@ sub find { return (@row ? $class->_row_to_object(\@cols, \@row) : ()); } -=item discard_changes +=head2 discard_changes Roll back changes that hasn't been comitted to the database. @@ -106,7 +104,7 @@ sub discard_changes { return $self; } -=item id +=head2 id returns the primary key(s) for the current row. Can't be called as a class method. @@ -120,7 +118,7 @@ sub id { return (wantarray ? @pk : $pk[0]); } -=item primary_columns +=head2 primary_columns read-only accessor which returns a list of primary keys. @@ -153,8 +151,6 @@ sub ident_condition { 1; -=back - =head1 AUTHORS Matt S. Trout diff --git a/lib/DBIx/Class/PK/Auto.pm b/lib/DBIx/Class/PK/Auto.pm index 6928ba7..ce745aa 100644 --- a/lib/DBIx/Class/PK/Auto.pm +++ b/lib/DBIx/Class/PK/Auto.pm @@ -21,9 +21,7 @@ one for your database, e.g. PK::Auto::SQLite =head1 METHODS -=over 4 - -=item insert +=head2 insert Overrides insert so that it will get the value of autoincremented primary keys. @@ -55,7 +53,7 @@ sub insert { return $ret; } -=item sequence +=head2 sequence Manually define the correct sequence for your table, to avoid the overhead associated with looking up the sequence automatically. @@ -66,8 +64,6 @@ __PACKAGE__->mk_classdata('sequence'); 1; -=back - =head1 AUTHORS Matt S. Trout diff --git a/lib/DBIx/Class/Relationship.pm b/lib/DBIx/Class/Relationship.pm index 65d646e..4a28a2b 100644 --- a/lib/DBIx/Class/Relationship.pm +++ b/lib/DBIx/Class/Relationship.pm @@ -42,15 +42,13 @@ Both C<$cond> and C<$attrs> are optional. Pass C for C<$cond> if you want to use the default value for it, but still want to set C<$attrs>. The following attributes are recognize: -=over 4 - -=item join_type +=head2 join_type Explicitly specifies the type of join to use in the relationship. Any SQL join type is valid, e.g. C or C. It will be placed in the SQL command immediately before C. -=item proxy +=head2 proxy An arrayref containing a list of accessors in the foreign class to proxy in the main class. If, for example, you do the following: @@ -62,8 +60,6 @@ Then, assuming Bar has an accessor named margle, you can do: my $obj = Foo->find(1); $obj->margle(10); # set margle; Bar object is created if it doesn't exist -=back - =head2 belongs_to my $f_obj = $obj->relname; diff --git a/lib/DBIx/Class/Relationship/Base.pm b/lib/DBIx/Class/Relationship/Base.pm index 4590985..8f41771 100644 --- a/lib/DBIx/Class/Relationship/Base.pm +++ b/lib/DBIx/Class/Relationship/Base.pm @@ -21,9 +21,7 @@ on searches. =head1 METHODS -=over 4 - -=item add_relationship +=head2 add_relationship __PACKAGE__->add_relationship('relname', 'Foreign::Class', $cond, $attrs); @@ -157,7 +155,7 @@ sub _cond_value { return $self->next::method($attrs, $key, $value) } -=item search_related +=head2 search_related My::Table->search_related('relname', $cond, $attrs); @@ -168,7 +166,7 @@ sub search_related { return $self->_query_related('search', @_); } -=item count_related +=head2 count_related My::Table->count_related('relname', $cond, $attrs); @@ -205,7 +203,7 @@ sub _query_related { )->$meth($query, $attrs); } -=item create_related +=head2 create_related My::Table->create_related('relname', \%col_data); @@ -216,7 +214,7 @@ sub create_related { return $class->new_related(@_)->insert; } -=item new_related +=head2 new_related My::Table->new_related('relname', \%col_data); @@ -240,7 +238,7 @@ sub new_related { return $self->resolve_class($rel_obj->{class})->new(\%fields); } -=item find_related +=head2 find_related My::Table->find_related('relname', @pri_vals | \%pri_vals); @@ -262,7 +260,7 @@ sub find_related { return $self->resolve_class($rel_obj->{class})->find($query); } -=item find_or_create_related +=head2 find_or_create_related My::Table->find_or_create_related('relname', \%col_data); @@ -273,7 +271,7 @@ sub find_or_create_related { return $self->find_related(@_) || $self->create_related(@_); } -=item set_from_related +=head2 set_from_related My::Table->set_from_related('relname', $rel_obj); @@ -302,7 +300,7 @@ sub set_from_related { return 1; } -=item update_from_related +=head2 update_from_related My::Table->update_from_related('relname', $rel_obj); @@ -314,7 +312,7 @@ sub update_from_related { $self->update; } -=item delete_related +=head2 delete_related My::Table->delete_related('relname', $cond, $attrs); @@ -327,8 +325,6 @@ sub delete_related { 1; -=back - =head1 AUTHORS Matt S. Trout diff --git a/lib/DBIx/Class/Row.pm b/lib/DBIx/Class/Row.pm index 061184d..3eab5b4 100644 --- a/lib/DBIx/Class/Row.pm +++ b/lib/DBIx/Class/Row.pm @@ -18,9 +18,7 @@ derived from L objects. =head1 METHODS -=over 4 - -=item new +=head2 new my $obj = My::Class->new($attrs); @@ -42,7 +40,7 @@ sub new { return $new; } -=item insert +=head2 insert $obj->insert; @@ -66,7 +64,7 @@ sub insert { return $self; } -=item in_storage +=head2 in_storage $obj->in_storage; # Get value $obj->in_storage(1); # Set value @@ -81,7 +79,7 @@ sub in_storage { return $self->{_in_storage}; } -=item create +=head2 create my $new = My::Class->create($attrs); @@ -95,7 +93,7 @@ sub create { return $class->new($attrs)->insert; } -=item update +=head2 update $obj->update; @@ -124,7 +122,7 @@ sub update { return $self; } -=item delete +=head2 delete $obj->delete @@ -155,7 +153,7 @@ sub delete { return $self; } -=item get_column +=head2 get_column my $val = $obj->get_column($col); @@ -172,7 +170,7 @@ sub get_column { return undef; } -=item get_columns +=head2 get_columns my %data = $obj->get_columns; @@ -185,7 +183,7 @@ sub get_columns { return map { $_ => $self->get_column($_) } $self->columns; } -=item set_column +=head2 set_column $obj->set_column($col => $val); @@ -203,7 +201,7 @@ sub set_column { return $ret; } -=item set_columns +=head2 set_columns my $copy = $orig->set_columns({ $col => $val, ... }); @@ -218,7 +216,7 @@ sub set_columns { } } -=item copy +=head2 copy my $copy = $orig->copy({ change => $to, ... }); @@ -226,7 +224,7 @@ Insert a new row with the specified changes. =cut -=item store_column +=head2 store_column $obj->store_column($col => $val); @@ -259,7 +257,7 @@ sub copy { return $new->insert; } -=item insert_or_update +=head2 insert_or_update $obj->insert_or_update @@ -272,7 +270,7 @@ sub insert_or_update { return ($self->in_storage ? $self->update : $self->insert); } -=item is_changed +=head2 is_changed my @changed_col_names = $obj->is_changed @@ -284,8 +282,6 @@ sub is_changed { 1; -=back - =head1 AUTHORS Matt S. Trout diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index 85c2db6..7bbc2f1 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -56,9 +56,7 @@ particular which module inherits off which. =head1 METHODS -=over 4 - -=item register_class +=head2 register_class Registers the class in the schema's class_registrations. This is a hash containing database classes, keyed by their monikers. It's used by @@ -73,7 +71,7 @@ sub register_class { $class->class_registrations(\%reg); } -=item registered_classes +=head2 registered_classes Simple read-only accessor for the schema's registered classes. See register_class above if you want to modify it. @@ -85,7 +83,7 @@ sub registered_classes { return values %{shift->class_registrations}; } -=item load_classes [, (, ), { => []}] +=head2 load_classes [, (, ), { => []}] Uses L to find all classes under the database class' namespace, or uses the classes you select. Then it loads the component (using L), @@ -142,7 +140,7 @@ sub load_classes { } } -=item compose_connection <@db_info> +=head2 compose_connection <@db_info> This is the most important method in this class. it takes a target namespace, as well as dbh connection info, and creates a L class as @@ -185,7 +183,7 @@ sub compose_connection { $conn_class->class_resolver($target); } -=item setup_connection_class <$target> <@info> +=head2 setup_connection_class <$target> <@info> Sets up a database connection class to inject between the schema and the subclasses the schema creates. @@ -201,8 +199,6 @@ sub setup_connection_class { 1; -=back - =head1 AUTHORS Matt S. Trout diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index aabb975..b1e06b6 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -105,8 +105,6 @@ This class represents the connection to the database =head1 METHODS -=over 4 - =cut sub dbh { @@ -137,7 +135,7 @@ sub _connect { return DBI->connect(@info); } -=item commit +=head2 commit $class->commit; @@ -147,7 +145,7 @@ Issues a commit again the current dbh sub commit { $_[0]->dbh->commit; } -=item rollback +=head2 rollback $class->rollback; @@ -218,8 +216,6 @@ sub sth { 1; -=back - =head1 AUTHORS Matt S. Trout diff --git a/lib/DBIx/Class/Table.pm b/lib/DBIx/Class/Table.pm index 2fa6f06..cc7a20d 100644 --- a/lib/DBIx/Class/Table.pm +++ b/lib/DBIx/Class/Table.pm @@ -31,8 +31,6 @@ L objects. =head1 METHODS -=over 4 - =cut sub _register_columns { @@ -47,7 +45,7 @@ sub _mk_column_accessors { $class->mk_group_accessors('column' => @cols); } -=item add_columns +=head2 add_columns __PACKAGE__->add_columns(qw/col1 col2 col3/); @@ -61,7 +59,7 @@ sub add_columns { $class->_mk_column_accessors(@cols); } -=item search_literal +=head2 search_literal my @obj = $class->search_literal($literal_where_cond, @bind); my $cursor = $class->search_literal($literal_where_cond, @bind); @@ -76,7 +74,7 @@ sub search_literal { return $class->search(\$cond, $attrs); } -=item count_literal +=head2 count_literal my $count = $class->count_literal($literal_where_cond); @@ -87,7 +85,7 @@ sub count_literal { return $class->search_literal(@_)->count; } -=item count +=head2 count my $count = $class->count({ foo => 3 }); @@ -98,7 +96,7 @@ sub count { return $class->search(@_)->count; } -=item search +=head2 search my @obj = $class->search({ foo => 3 }); # "... WHERE foo = 3" my $cursor = $class->search({ foo => 3 }); @@ -137,7 +135,7 @@ sub resultset { my $rs = $rs_class->new($class, @_); } -=item search_like +=head2 search_like Identical to search except defaults to 'LIKE' instead of '=' in condition @@ -158,7 +156,7 @@ sub _select_columns { return keys %{$_[0]->_columns}; } -=item table +=head2 table __PACKAGE__->table('tbl_name'); @@ -168,7 +166,7 @@ sub table { shift->_table_name(@_); } -=item find_or_create +=head2 find_or_create $class->find_or_create({ key => $val, ... }); @@ -184,7 +182,7 @@ sub find_or_create { return defined($exists) ? $exists : $class->create($hash); } -=item has_column +=head2 has_column if ($obj->has_column($col)) { ... } @@ -197,7 +195,7 @@ sub has_column { return exists $self->_columns->{$column}; } -=item column_info +=head2 column_info my $info = $obj->column_info($col); @@ -211,7 +209,7 @@ sub column_info { return $self->_columns->{$column}; } -=item columns +=head2 columns my @column_names = $obj->columns; @@ -224,8 +222,6 @@ sub columns { 1; -=back - =head1 AUTHORS Matt S. Trout diff --git a/lib/DBIx/Class/UUIDColumns.pm b/lib/DBIx/Class/UUIDColumns.pm index 63df67b..dca0c58 100644 --- a/lib/DBIx/Class/UUIDColumns.pm +++ b/lib/DBIx/Class/UUIDColumns.pm @@ -24,9 +24,7 @@ Note that the component needs to be loaded before Core. =head1 METHODS -=over 4 - -=item uuid_columns +=head2 uuid_columns =cut @@ -52,8 +50,6 @@ sub get_uuid { return Data::UUID->new->to_string(Data::UUID->new->create), } -=back - =head1 AUTHORS Chia-liang Kao