From: Shawn M Moore Date: Wed, 4 Jun 2008 04:04:50 +0000 (+0000) Subject: Add predicates to the informational Mouse::Attribute attributes X-Git-Tag: 0.04~95 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ccea8101f730f46ee7e85769b6472cf91d0f5240;p=gitmo%2FMouse.git Add predicates to the informational Mouse::Attribute attributes --- diff --git a/lib/Mouse/Attribute.pm b/lib/Mouse/Attribute.pm index 4c2caf0..da448b5 100644 --- a/lib/Mouse/Attribute.pm +++ b/lib/Mouse/Attribute.pm @@ -26,6 +26,16 @@ sub weak_ref { $_[0]->{weak_ref} } sub init_arg { $_[0]->{init_arg} } sub type_constraint { $_[0]->{type_constraint} } +sub has_name { exists $_[0]->{name} } +sub has_class { exists $_[0]->{class} } +sub has_default { exists $_[0]->{default} } +sub has_predicate { exists $_[0]->{predicate} } +sub has_clearer { exists $_[0]->{clearer} } +sub has_handles { exists $_[0]->{handles} } +sub has_weak_ref { exists $_[0]->{weak_ref} } +sub has_init_arg { exists $_[0]->{init_arg} } +sub has_type_constraint { exists $_[0]->{type_constraint} } + sub generate_accessor { my $attribute = shift;