| Rose-HTMLx-Form-Related documentation | Contained in the Rose-HTMLx-Form-Related distribution. |
Rose::HTMLx::Form::Related::RelInfo - relationship summary
Objects of this class are get/set from the various relationship methods in Metadata. See Rose::HTMLx::Form::Related::Metadata init_relationships().
These are all get/set methods.
Returns controller() or fetches and caches a controller instance based on app().
Returns the name of the foreign column related to field_name. Shortcut for looking up items in cmap().
Returns all non-blessed values in a single hashref. Suitable for debugging.
Peter Karman, <karman at cpan.org>
Please report any bugs or feature requests to
bug-rose-htmlx-form-related at rt.cpan.org, or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Rose-HTMLx-Form-Related.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Rose::HTMLx::Form::Related
You can also look for information at:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Rose-HTMLx-Form-Related
The Minnesota Supercomputing Institute http://www.msi.umn.edu/
sponsored the development of this software.
Copyright 2008 by the Regents of the University of Minnesota.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Rose-HTMLx-Form-Related documentation | Contained in the Rose-HTMLx-Form-Related distribution. |
package Rose::HTMLx::Form::Related::RelInfo; use strict; use warnings; use base qw( Rose::Object ); use Rose::Object::MakeMethods::Generic ( 'scalar --get_set' => [ qw( name type method label object_class foreign_class foreign_column map_from map_to map_class map_to_column map_from_column cmap controller controller_class app map_class_controller_class ) ], ); use Carp; use Scalar::Util; our $VERSION = '0.22';
sub get_controller { my $self = shift; return $self->controller if defined $self->controller; my $c = $self->app->controller( $self->controller_class ); $self->controller($c); return $c; }
sub foreign_column_for { my $self = shift; my $name = shift; if ( ref( $self->foreign_column ) ) { return $self->foreign_column->{$name}; } else { return $self->foreign_column; } }
sub as_hash { my $self = shift; my %hash; for my $key ( keys %$self ) { my $value = $self->$key; if ( !Scalar::Util::blessed($value) ) { $hash{$key} = $value; } } return \%hash; } 1; __END__