[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[8048] Parser.pm remove code allowing calling in an object-oriented way
From: |
gavinsmith0123 |
Subject: |
[8048] Parser.pm remove code allowing calling in an object-oriented way |
Date: |
Sun, 12 Aug 2018 16:46:09 -0400 (EDT) |
Revision: 8048
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8048
Author: gavin
Date: 2018-08-12 16:46:09 -0400 (Sun, 12 Aug 2018)
Log Message:
-----------
Parser.pm remove code allowing calling in an object-oriented way
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Parser.pm
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2018-08-12 20:28:59 UTC (rev 8047)
+++ trunk/ChangeLog 2018-08-12 20:46:09 UTC (rev 8048)
@@ -1,5 +1,10 @@
2018-08-12 Gavin Smith <address@hidden>
+ * tp/Texinfo/Parser.pm (parser): Remove code allowing calling
+ this function in an object-oriented way.
+
+2018-08-12 Gavin Smith <address@hidden>
+
* tp/Texinfo/Parser.pm (parser, duplicate_parser): Move code out
for duplicating an existing parser to a new function.
* tp/Texinfo/Convert/HTML.pm (output) <renamed nodes>: Call
Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm 2018-08-12 20:28:59 UTC (rev 8047)
+++ trunk/tp/Texinfo/Parser.pm 2018-08-12 20:46:09 UTC (rev 8048)
@@ -607,27 +607,13 @@
# initialization entry point. Set up a parser.
# The last argument, optional, is a hash provided by the user to change
# the default values for what is present in %parser_default_configuration.
-# The exact arguments of the function depend on how it was called,
-# in a object oriented way or not.
sub parser(;$$)
{
- my $class = shift;
- my $conf;
+ my $conf = shift;
my $parser = dclone(\%parser_default_configuration);
+ bless $parser;
- # called not object-oriented
- if (ref($class) eq 'HASH') {
- #print STDERR "Not oo\n"
- $conf = $class;
- bless $parser;
- } elsif (defined($class)) {
- bless $parser, $class;
- $conf = shift;
- } else {
- bless $parser;
- $conf = shift;
- }
return _setup_parser($parser, $conf);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [8048] Parser.pm remove code allowing calling in an object-oriented way,
gavinsmith0123 <=