Revision history for Catalyst-Plugin-Authentication-Store-DBIx-Class
+ * Make can() work as well as AUTOLOADing.
+
0.1300 2010-06-16
* Support columns with accessors that aren't the column name.
* Fix some documentation typos.
$self->_user->auto_update( @_ );
}
+sub can {
+ my $self = shift;
+ return $self->SUPER::can(@_) || do {
+ my ($method) = @_; warn $method;
+ if (my $code = $self->_user->can($method)) {
+ sub { shift->_user->$code(@_) }
+ } elsif (my $accessor =
+ try { $self->_user->result_source->column_info($method)->{accessor} }) {
+ sub { shift->_user->$accessor }
+ } else {
+ undef;
+ }
+ };
+}
+
sub AUTOLOAD {
my $self = shift;
(my $method) = (our $AUTOLOAD =~ /([^:]+)$/);
Jason Kuri (jayk@cpan.org)
+=head1 CONTRIBUTORS
+
+Matt S Trout (mst) <mst@shadowcat.co.uk>
+
=head1 LICENSE
-Copyright (c) 2007 the aforementioned authors. All rights
+Copyright (c) 2007-2010 the aforementioned authors. All rights
reserved. This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.