File: programlistingco.example.1.xml

package info (click to toggle)
libxml2 2.6.16-7sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 39,520 kB
  • ctags: 17,752
  • sloc: xml: 145,516; ansic: 140,533; python: 10,324; sh: 8,559; makefile: 1,535; php: 366; perl: 67
file content (26 lines) | stat: -rw-r--r-- 1,170 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0"?>
<!DOCTYPE programlistingco PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<programlistingco><areaspec><areaset id="ex.plco.const" coords=""><area id="ex.plco.c1" coords="4"/><area id="ex.plco.c2" coords="8"/></areaset><area id="ex.plco.ret" coords="12"/><area id="ex.plco.dest" coords="12"/></areaspec><programlisting>
sub do_nothing_useful {
    my($a, $b, $c);

    $a = new A;
    
    $a-&gt;does_nothing_either();

    $b = new B; 

    $c = &quot;frog&quot;;

    return ($a, $c);
}
</programlisting><calloutlist><callout arearefs="ex.plco.const"><para>
These are calls to the constructor <function>new</function> in the object
classes.
</para></callout><callout arearefs="ex.plco.ret"><para>
This function returns a two-element list.
</para></callout><callout arearefs="ex.plco.dest"><para>
The <emphasis>destructor</emphasis> (<function>DESTROY</function>) for
the object <literal>$b</literal> will be called automatically for this
object since there can be no other references to it outside this function.
</para></callout></calloutlist></programlistingco>