summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-09-09 05:53:41 (GMT)
committerFred Drake <fdrake@acm.org>2000-09-09 05:53:41 (GMT)
commit75c6cb909c5832c36875015a5f9edb28d1977f32 (patch)
tree2eadce03f2a4b06cb4825527ec86742a9f4f5d0d
parent1b194f927d88d4191b04cfd00eebc1ed8a430655 (diff)
downloadcpython-75c6cb909c5832c36875015a5f9edb28d1977f32.zip
cpython-75c6cb909c5832c36875015a5f9edb28d1977f32.tar.gz
cpython-75c6cb909c5832c36875015a5f9edb28d1977f32.tar.bz2
Add support for a filename to record the name of the node in which the
table will be presented. Accessor methods are used to access the attribute.
-rw-r--r--Doc/perl/SynopsisTable.pm16
1 files changed, 15 insertions, 1 deletions
diff --git a/Doc/perl/SynopsisTable.pm b/Doc/perl/SynopsisTable.pm
index fb063d4..6a03dd2 100644
--- a/Doc/perl/SynopsisTable.pm
+++ b/Doc/perl/SynopsisTable.pm
@@ -1,7 +1,7 @@
package SynopsisTable;
sub new{
- return bless {names=>'', info=>{}};
+ return bless {names=>'', info=>{}, file=>''};
}
sub declare{
@@ -15,6 +15,20 @@ sub declare{
$self->{info}{$name} = "$key,$type,";
}
+# The 'file' attribute is used to store the filename of the node in which
+# the table will be presented; this assumes that each table will be presented
+# only once, which works for the current use of this object.
+
+sub set_file{
+ my($self, $filename) = @_;
+ $self->{file} = "$filename";
+}
+
+sub get_file{
+ my $self = shift;
+ return $self->{file};
+}
+
sub set_synopsis{
my($self,$name,$synopsis) = @_;
my($key,$type,$unused) = split ',', $self->{info}{$name}, 3;