Declare::Constraints::Simple::Library::OO man page on Pidora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Pidora logo
[printable version]

Declare::Constraints::UserlContribDeclare::Constraints::Simple::Library::OO(3)

NAME
       Declare::Constraints::Simple::Library::OO - OO Constraints

SYNOPSIS
	 # accept objects or classes
	 my $object_or_class = Or( IsObject, IsClass );

	 # valid on objects with all methods
	 my $proper_object = And( IsObject,
				  HasMethods( qw(foo bar) ));

	 # validate against date objects
	 my $is_date_object = IsA('DateTime');

DESCRIPTION
       This library contains the constraints for validating parameters in an
       object oriented manner.

CONSTRAINTS
   HasMethods(@methods)
       Returns true if the value is an object or class that "can" all the
       specified @methods.

       The stack or path part of "HasMethods" looks like "HasMethods[$method]"
       where $method is the first found missing method.

   IsA(@classes)
       Is true if the passed object or class is a subclass of one of the
       classes mentioned in @classes.

   IsClass()
       Valid if value is a loaded class.

   IsObject()
       True if the value is blessed.

SEE ALSO
       Declare::Constraints::Simple, Declare::Constraints::Simple::Library

AUTHOR
       Robert 'phaylon' Sedlacek "<phaylon@dunkelheit.at>"

LICENSE AND COPYRIGHT
       This module is free software, you can redistribute it and/or modify it
       under the same terms as perl itself.

perl v5.14.1			  Declare::Constraints::Simple::Library::OO(3)
[top]

List of man pages available for Pidora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net