| 1 | package Class::Value::URI::ftp; |
|---|
| 2 | |
|---|
| 3 | use strict; |
|---|
| 4 | use warnings; |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | our $VERSION = '0.03'; |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | use base 'Class::Value::SemanticAdapter'; |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | __PACKAGE__ |
|---|
| 14 | ->mk_scalar_accessors(qw(type)) |
|---|
| 15 | ->mk_boolean_accessors(qw(password)); |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | sub semantic_args { |
|---|
| 19 | my $self = shift; |
|---|
| 20 | ( |
|---|
| 21 | $self->SUPER::semantic_args(@_), |
|---|
| 22 | type => $self->type, |
|---|
| 23 | password => $self->password, |
|---|
| 24 | ); |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | 1; |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | __END__ |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | =head1 NAME |
|---|
| 36 | |
|---|
| 37 | Class::Value::URI::ftp - value class for FTP URIs |
|---|
| 38 | |
|---|
| 39 | =head1 SYNOPSIS |
|---|
| 40 | |
|---|
| 41 | Class::Value::URI::ftp->new; |
|---|
| 42 | |
|---|
| 43 | =head1 DESCRIPTION |
|---|
| 44 | |
|---|
| 45 | This value class uses the L<Class::Value> mechanism and is an adapter for |
|---|
| 46 | L<Data::Semantic::URI::ftp> - see there for more information. |
|---|
| 47 | |
|---|
| 48 | =head1 METHODS |
|---|
| 49 | |
|---|
| 50 | =over 4 |
|---|
| 51 | |
|---|
| 52 | =item clear_password |
|---|
| 53 | |
|---|
| 54 | $obj->clear_password; |
|---|
| 55 | |
|---|
| 56 | Clears the boolean value by setting it to 0. |
|---|
| 57 | |
|---|
| 58 | =item clear_type |
|---|
| 59 | |
|---|
| 60 | $obj->clear_type; |
|---|
| 61 | |
|---|
| 62 | Clears the value. |
|---|
| 63 | |
|---|
| 64 | =item password |
|---|
| 65 | |
|---|
| 66 | $obj->password($value); |
|---|
| 67 | my $value = $obj->password; |
|---|
| 68 | |
|---|
| 69 | If called without an argument, returns the boolean value (0 or 1). If called |
|---|
| 70 | with an argument, it normalizes it to the boolean value. That is, the values |
|---|
| 71 | 0, undef and the empty string become 0; everything else becomes 1. |
|---|
| 72 | |
|---|
| 73 | =item password_clear |
|---|
| 74 | |
|---|
| 75 | $obj->password_clear; |
|---|
| 76 | |
|---|
| 77 | Clears the boolean value by setting it to 0. |
|---|
| 78 | |
|---|
| 79 | =item password_set |
|---|
| 80 | |
|---|
| 81 | $obj->password_set; |
|---|
| 82 | |
|---|
| 83 | Sets the boolean value to 1. |
|---|
| 84 | |
|---|
| 85 | =item set_password |
|---|
| 86 | |
|---|
| 87 | $obj->set_password; |
|---|
| 88 | |
|---|
| 89 | Sets the boolean value to 1. |
|---|
| 90 | |
|---|
| 91 | =item type |
|---|
| 92 | |
|---|
| 93 | my $value = $obj->type; |
|---|
| 94 | $obj->type($value); |
|---|
| 95 | |
|---|
| 96 | A basic getter/setter method. If called without an argument, it returns the |
|---|
| 97 | value. If called with a single argument, it sets the value. |
|---|
| 98 | |
|---|
| 99 | =item type_clear |
|---|
| 100 | |
|---|
| 101 | $obj->type_clear; |
|---|
| 102 | |
|---|
| 103 | Clears the value. |
|---|
| 104 | |
|---|
| 105 | =back |
|---|
| 106 | |
|---|
| 107 | Class::Value::URI::ftp inherits from L<Class::Value::SemanticAdapter>. |
|---|
| 108 | |
|---|
| 109 | The superclass L<Class::Value::SemanticAdapter> defines these methods and |
|---|
| 110 | functions: |
|---|
| 111 | |
|---|
| 112 | adaptee(), is_valid_normalized_value(), is_valid_value(), |
|---|
| 113 | normalize_value(), semantic_class_name() |
|---|
| 114 | |
|---|
| 115 | The superclass L<Class::Value> defines these methods and functions: |
|---|
| 116 | |
|---|
| 117 | new(), MUNGE_CONSTRUCTOR_ARGS(), check(), clear_exception_container(), |
|---|
| 118 | clear_notify_delegate(), comparable(), exception_container(), |
|---|
| 119 | exception_container_clear(), get_value(), init(), is_defined(), |
|---|
| 120 | is_valid(), is_well_formed(), is_well_formed_value(), normalize(), |
|---|
| 121 | notify_delegate(), notify_delegate_clear(), run_checks(), |
|---|
| 122 | run_checks_with_exception_container(), send_notify_value_invalid(), |
|---|
| 123 | send_notify_value_normalized(), send_notify_value_not_wellformed(), |
|---|
| 124 | set_value(), skip_checks(), skip_dirtying(), skip_normalizations(), |
|---|
| 125 | str_cmp(), stringify(), throw_single_exception(), value() |
|---|
| 126 | |
|---|
| 127 | The superclass L<Class::Accessor::Complex> defines these methods and |
|---|
| 128 | functions: |
|---|
| 129 | |
|---|
| 130 | mk_abstract_accessors(), mk_array_accessors(), mk_boolean_accessors(), |
|---|
| 131 | mk_class_array_accessors(), mk_class_hash_accessors(), |
|---|
| 132 | mk_class_scalar_accessors(), mk_concat_accessors(), |
|---|
| 133 | mk_forward_accessors(), mk_hash_accessors(), mk_integer_accessors(), |
|---|
| 134 | mk_new(), mk_object_accessors(), mk_scalar_accessors(), |
|---|
| 135 | mk_set_accessors(), mk_singleton() |
|---|
| 136 | |
|---|
| 137 | The superclass L<Class::Accessor> defines these methods and functions: |
|---|
| 138 | |
|---|
| 139 | _carp(), _croak(), _mk_accessors(), accessor_name_for(), |
|---|
| 140 | best_practice_accessor_name_for(), best_practice_mutator_name_for(), |
|---|
| 141 | follow_best_practice(), get(), make_accessor(), make_ro_accessor(), |
|---|
| 142 | make_wo_accessor(), mk_accessors(), mk_ro_accessors(), |
|---|
| 143 | mk_wo_accessors(), mutator_name_for(), set() |
|---|
| 144 | |
|---|
| 145 | The superclass L<Class::Accessor::Installer> defines these methods and |
|---|
| 146 | functions: |
|---|
| 147 | |
|---|
| 148 | install_accessor() |
|---|
| 149 | |
|---|
| 150 | The superclass L<Class::Accessor::Constructor> defines these methods and |
|---|
| 151 | functions: |
|---|
| 152 | |
|---|
| 153 | _make_constructor(), mk_constructor(), mk_constructor_with_dirty(), |
|---|
| 154 | mk_singleton_constructor() |
|---|
| 155 | |
|---|
| 156 | The superclass L<Data::Inherited> defines these methods and functions: |
|---|
| 157 | |
|---|
| 158 | every_hash(), every_list(), flush_every_cache_by_key() |
|---|
| 159 | |
|---|
| 160 | The superclass L<Class::Accessor::Constructor::Base> defines these methods |
|---|
| 161 | and functions: |
|---|
| 162 | |
|---|
| 163 | STORE(), clear_dirty(), clear_hygienic(), clear_unhygienic(), |
|---|
| 164 | contains_hygienic(), contains_unhygienic(), delete_hygienic(), |
|---|
| 165 | delete_unhygienic(), dirty(), dirty_clear(), dirty_set(), |
|---|
| 166 | elements_hygienic(), elements_unhygienic(), hygienic(), |
|---|
| 167 | hygienic_clear(), hygienic_contains(), hygienic_delete(), |
|---|
| 168 | hygienic_elements(), hygienic_insert(), hygienic_is_empty(), |
|---|
| 169 | hygienic_size(), insert_hygienic(), insert_unhygienic(), |
|---|
| 170 | is_empty_hygienic(), is_empty_unhygienic(), set_dirty(), |
|---|
| 171 | size_hygienic(), size_unhygienic(), unhygienic(), unhygienic_clear(), |
|---|
| 172 | unhygienic_contains(), unhygienic_delete(), unhygienic_elements(), |
|---|
| 173 | unhygienic_insert(), unhygienic_is_empty(), unhygienic_size() |
|---|
| 174 | |
|---|
| 175 | The superclass L<Tie::StdHash> defines these methods and functions: |
|---|
| 176 | |
|---|
| 177 | CLEAR(), DELETE(), EXISTS(), FETCH(), FIRSTKEY(), NEXTKEY(), SCALAR(), |
|---|
| 178 | TIEHASH() |
|---|
| 179 | |
|---|
| 180 | =head1 BUGS AND LIMITATIONS |
|---|
| 181 | |
|---|
| 182 | No bugs have been reported. |
|---|
| 183 | |
|---|
| 184 | Please report any bugs or feature requests through the web interface at |
|---|
| 185 | L<http://rt.cpan.org>. |
|---|
| 186 | |
|---|
| 187 | =head1 INSTALLATION |
|---|
| 188 | |
|---|
| 189 | See perlmodinstall for information and options on installing Perl modules. |
|---|
| 190 | |
|---|
| 191 | =head1 AVAILABILITY |
|---|
| 192 | |
|---|
| 193 | The latest version of this module is available from the Comprehensive Perl |
|---|
| 194 | Archive Network (CPAN). Visit <http://www.perl.com/CPAN/> to find a CPAN |
|---|
| 195 | site near you. Or see <http://www.perl.com/CPAN/authors/id/M/MA/MARCEL/>. |
|---|
| 196 | |
|---|
| 197 | =head1 AUTHORS |
|---|
| 198 | |
|---|
| 199 | Marcel GrE<uuml>nauer, C<< <marcel@cpan.org> >> |
|---|
| 200 | |
|---|
| 201 | =head1 COPYRIGHT AND LICENSE |
|---|
| 202 | |
|---|
| 203 | Copyright 2007-2008 by the authors. |
|---|
| 204 | |
|---|
| 205 | This library is free software; you can redistribute it and/or modify |
|---|
| 206 | it under the same terms as Perl itself. |
|---|
| 207 | |
|---|
| 208 | |
|---|
| 209 | =cut |
|---|
| 210 | |
|---|