GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Declare::Constraints::Simple::Library::OO(3) User Contributed Perl Documentation Declare::Constraints::Simple::Library::OO(3)

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

  # 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');

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

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.

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

Valid if value is a loaded class.

True if the value is blessed.

Declare::Constraints::Simple, Declare::Constraints::Simple::Library

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

This module is free software, you can redistribute it and/or modify it under the same terms as perl itself.
2006-09-11 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.