From: Gurusamy Sarathy Date: Sat, 11 Mar 2000 16:07:35 +0000 (+0000) Subject: remove =for section (from Johan Vromans) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3ca1d9d436340b88707e8c4386efccb6ea8d2059;p=p5sagit%2Fp5-mst-13.2.git remove =for section (from Johan Vromans) p4raw-id: //depot/perl@5650 --- diff --git a/lib/Getopt/Long.pm b/lib/Getopt/Long.pm index 6e6c7e6..097e14a 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;