[libmixin-extrafields-param-perl] 12/25: r19821 at knave: rjbs | 2006-03-14 21:13:12 -0500 has_param
Florian Schlichting
fsfs at moszumanska.debian.org
Wed Jan 29 21:00:23 UTC 2014
This is an automated email from the git hooks/post-receive script.
fsfs pushed a commit to annotated tag 0.001
in repository libmixin-extrafields-param-perl.
commit d45747cd8283a1886f8e45cb9c418b3bb5f37563
Author: Ricardo SIGNES <rjbs at codesimply.com>
Date: Wed Mar 15 02:21:04 2006 +0000
r19821 at knave: rjbs | 2006-03-14 21:13:12 -0500
has_param
---
lib/Mixin/Param.pm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/lib/Mixin/Param.pm b/lib/Mixin/Param.pm
index 7c35f40..ba05eb6 100644
--- a/lib/Mixin/Param.pm
+++ b/lib/Mixin/Param.pm
@@ -116,6 +116,23 @@ sub delete_param {
return wantarray ? @deleted : $deleted[0];
}
+=head2 C< has_param >
+
+ if ($object->has_param($name) { ... }
+
+=cut
+
+sub has_param {
+ my ($self, $key) = @_;
+
+ Carp::croak "delete_param is an instance method"
+ unless Scalar::Util::blessed($self);
+
+ my $stash = $_params_for{ $self } ||= {};
+
+ return exists $stash->{$key};
+}
+
=head1 AUTHOR
Ricardo Signes, C<< <rjbs at cpan.org> >>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmixin-extrafields-param-perl.git
More information about the Pkg-perl-cvs-commits
mailing list