diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-11 16:07:35 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-11 16:07:35 +0000 |
commit | 3ca1d9d436340b88707e8c4386efccb6ea8d2059 (patch) | |
tree | 656d6efd3c3215be08bb0d2c025c9c1928b53795 /lib/Getopt | |
parent | b4e8cfaff46a723e83675b91937732e72801db94 (diff) | |
download | perl-3ca1d9d436340b88707e8c4386efccb6ea8d2059.tar.gz |
remove =for section (from Johan Vromans)
p4raw-id: //depot/perl@5650
Diffstat (limited to 'lib/Getopt')
-rw-r--r-- | lib/Getopt/Long.pm | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/lib/Getopt/Long.pm b/lib/Getopt/Long.pm index 6e6c7e67a7..097e14a7d6 100644 --- a/lib/Getopt/Long.pm +++ b/lib/Getopt/Long.pm @@ -100,75 +100,6 @@ sub ConfigDefaults () { ConfigDefaults(); -################ Object Oriented routines ################ - -=for experimental - -# NOTE: The object oriented routines use $error for thread locking. -eval "sub lock{}" if $] < 5.005; - -# Store a copy of the default configuration. Since ConfigDefaults has -# just been called, what we get from Configure is the default. -my $default_config = do { lock ($error); Configure () }; - -sub new { - my $that = shift; - my $class = ref($that) || $that; - - # Register the callers package. - my $self = { caller => (caller)[0] }; - - bless ($self, $class); - - # Process construct time configuration. - if ( @_ > 0 ) { - lock ($error); - my $save = Configure ($default_config, @_); - $self->{settings} = Configure ($save); - } - # Else use default config. - else { - $self->{settings} = $default_config; - } - - $self; -} - -sub configure { - my ($self) = shift; - - lock ($error); - - # Restore settings, merge new settings in. - my $save = Configure ($self->{settings}, @_); - - # Restore orig config and save the new config. - $self->{settings} = Configure ($save); -} - -sub getoptions { - my ($self) = shift; - - lock ($error); - - # Restore config settings. - my $save = Configure ($self->{settings}); - - # Call main routine. - my $ret = 0; - $caller = $self->{caller}; - eval { $ret = GetOptions (@_); }; - - # Restore saved settings. - Configure ($save); - - # Handle errors and return value. - die ($@) if $@; - return $ret; -} - -=cut - ################ Package return ################ 1; |