Changeset 26333 for trunk/Nebulous/lib
- Timestamp:
- Dec 3, 2009, 3:31:01 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous/lib/Nebulous/Client.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/lib/Nebulous/Client.pm
r26292 r26333 755 755 optional => 1, 756 756 }, 757 { 758 #find_invalid 759 type => SCALAR|UNDEF, 760 optional => 1, 761 }, 757 762 ); 758 763 … … 951 956 my $self = shift; 952 957 953 my ($key, $force ) = validate_pos( @_,958 my ($key, $force, $invalid) = validate_pos( @_, 954 959 { 955 960 type => SCALAR, … … 965 970 }, 966 971 }, 967 ); 968 969 $log->debug( "entered - @_" ); 970 971 my $locations = $self->find_instances( $key, 'any' ); 972 { 973 type => BOOLEAN, 974 optional => 1, 975 default => undef, 976 callbacks => { 977 'is boolean' => sub { 978 $_[0] == 0 or $_[0] == 1 or $_[0] == undef; 979 }, 980 }, 981 }, 982 ); 983 984 $log->debug( "entered - @_" ); 985 986 987 my $locations; 988 if ($invalid) { 989 $locations = $self->find_instances( $key, 'any', 'find them all'); 990 } 991 else { 992 $locations = $self->find_instances( $key, 'any' ); 993 } 972 994 973 995 return undef unless $locations;
Note:
See TracChangeset
for help on using the changeset viewer.
