Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dbix::class::introspectablem2m(3pm) [debian man page]

DBIx::Class::IntrospectableM2M(3pm)			User Contributed Perl Documentation		       DBIx::Class::IntrospectableM2M(3pm)

NAME
DBIx::Class::IntrospectableM2M - Introspect many-to-many shortcuts SYNOPSIS
In your DBIx::Class Result class (sometimes erroneously referred to as the 'table' class): __PACKAGE__->load_components(qw/IntrospectableM2M ... Core/); #Digest encoder with hex format and SHA-1 algorithm __PACKAGE__->many_to_many(roles => user_roles => 'role); When you want to introspect this data my $metadata = $result_class->_m2m_metadata->{roles}; # $metadata->{accessor} method name e.g. 'roles' # $metadata->{relation} maping relation e.g. 'user_roles' # $metadata->{foreign_relation} far-side relation e.g. 'role # $metadata->{attrs} relationship attributes, if any # Convenience methods created by DBIx::Class # $metadata->{rs_method} 'roles_rs' # $metadata->{add_method} 'add_to_roles', # $metadata->{set_method} 'set_roles', # $metadata->{remove_method} 'remove_from_roles' Note: The component needs to be loaded before Core. COMPATIBILITY NOTICE
This module is fairly esoteric and, unless you are dynamically creating something out of of a DBIC Schema, is probably the wrong solution for whatever it is you are trying to do. Please be advised that compatibility is not guaranteed for DBIx::Class 0.09000+. We will try to mantain all compatibility, but internal changes might make it impossible. DESCRIPTION
Because the many-to-many relationships are not real relationships, they can not be introspected with DBIx::Class. Many-to-many relationships are actually just a collection of convenience methods installed to bridge two relationships. This DBIx::Class component can be used to store all relevant information about these non-relationships so they can later be introspected and examined. METHODS
many_to_many Extended to store all relevant information in the "_m2m_metadata" HASH ref. _m2m_metadata Accessor to a HASH ref where the keys are the names of m2m relationships and the value is a HASH ref as described in the SYNOPSIS. AUTHOR
Guillermo Roditi (groditi) <groditi@cpan.org> COPYRIGHT AND LICENSE
Copyright (C) 2008 by Guillermo Roditi This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2008-11-11 DBIx::Class::IntrospectableM2M(3pm)

Check Out this Related Man Page

DBIx::Class::Manual::DocMap(3pm)			User Contributed Perl Documentation			  DBIx::Class::Manual::DocMap(3pm)

NAME
DBIx::Class::Manual::DocMap - What documentation do we have? Manuals DBIx::Class::Manual - User's Manual overview. DBIx::Class::Manual::FAQ - Frequently Asked Questions, gathered from IRC and the mailing list. DBIx::Class::Manual::Intro - Introduction to setting up and using DBIx::Class. DBIx::Class::Manual::Example - Full example Schema. DBIx::Class::Manual::Cookbook - Various short recipes on how to do things. DBIx::Class::Manual::Troubleshooting - What to do if things go wrong (diagnostics of known error messages). DBIx::Class::Manual::Component - How to write your own DBIx::Class components. DBIx::Class::Manual::Glossary - What do all those terms mean? Setting up DBIx::Class::Schema - Overall schemas, and connection container. DBIx::Class::ResultSource - Source/Table definition functions. DBIx::Class::Relationship - Simple relationships. DBIx::Class::Relationship::Base - Relationship details. DBIx::Class::PK::Auto - Magically retrieve auto-incrementing fields. DBIx::Class::Core - Set of standard components to load. DBIx::Class::InflateColumn - Making objects out of your columns. DBIx::Class::InflateColumn::DateTime - Magically turn your datetime or timestamp columns into DateTime objects. DBIx::Class::PK - Dealing with primary keys. DBIx::Class::ResultSourceProxy::Table - Turns the resultsource into a table. DBIx::Class::AccessorGroup - Accessor grouping. Retrieving and creating data DBIx::Class::ResultSet - Selecting and manipulating sets. DBIx::Class::ResultSetColumn - Perform operations on entire columns of a ResultSet. DBIx::Class::Row - Dealing with actual data. DBIx::Class::Storage - Basic Storage stuff. DBIx::Class::Storage::DBI - Storage using DBI and SQL::Abstract. perl v5.14.2 2010-06-03 DBIx::Class::Manual::DocMap(3pm)
Man Page