[Bps-public-commit] r15272 - in Prophet/trunk: .
sartak at bestpractical.com
sartak at bestpractical.com
Wed Aug 20 04:11:17 EDT 2008
Author: sartak
Date: Wed Aug 20 04:11:17 2008
New Revision: 15272
Modified:
Prophet/trunk/ (props changed)
Prophet/trunk/lib/Prophet/CLI.pm
Log:
r69838 at onn: sartak | 2008-08-20 04:11:10 -0400
Use MX:AH for clearing the prop and arg hashes
Modified: Prophet/trunk/lib/Prophet/CLI.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI.pm (original)
+++ Prophet/trunk/lib/Prophet/CLI.pm Wed Aug 20 04:11:17 2008
@@ -63,6 +63,7 @@
exists => 'has_arg',
delete => 'delete_arg',
keys => 'arg_names',
+ clear => 'clear_args',
},
documentation => "This is a reference to the key-value pairs passed in on the commandline",
);
@@ -78,6 +79,7 @@
exists => 'has_prop',
delete => 'delete_prop',
keys => 'prop_names',
+ clear => 'clear_props',
},
);
@@ -405,34 +407,11 @@
}
}
-=head2 clear_args
-
-Clears all of the current object's set arguments.
-
-=cut
-
-sub clear_args {
+# clear the prop_set too!
+after clear_props => sub {
my $self = shift;
-
- foreach my $arg ($self->arg_names) {
- $self->delete_arg($arg);
- }
-}
-
-=head2 clear_props
-
-Clears all of the current object's set properties.
-
-=cut
-
-sub clear_props {
- my $self = shift;
-
- foreach my $prop ($self->prop_names) {
- $self->delete_prop($prop);
- }
$self->prop_set( ( ) );
-}
+};
=head2 invoke [outhandle], ARGV
More information about the Bps-public-commit
mailing list