home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_a18e74556d280657e357c1e75b9bc8a4
< prev
next >
Wrap
Text File
|
2000-03-23
|
3KB
|
105 lines
<HTML>
<HEAD>
<TITLE>Class::Template - struct/member template builder</TITLE>
<LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
<LINK REV="made" HREF="mailto:">
</HEAD>
<BODY>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> Class::Template - struct/member template builder</P></STRONG>
</TD></TR>
</TABLE>
<A NAME="__index__"></A>
<!-- INDEX BEGIN -->
<UL>
<LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
<LI><A HREF="#examples">EXAMPLES</A></LI>
<LI><A HREF="#notes">NOTES</A></LI>
</UL>
<!-- INDEX END -->
<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P>Class::Template - struct/member template builder</P>
<P>
<HR>
<H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
<UL>
<LI>Linux</LI>
<LI>Solaris</LI>
<LI>Windows</LI>
</UL>
<HR>
<H1><A NAME="examples">EXAMPLES</A></H1>
<UL>
<LI><STRONG><A NAME="item_Example_1">Example 1</A></STRONG><BR>
<PRE>
use Class::Template;
</PRE>
<PRE>
struct( rusage => {
ru_utime => timeval,
ru_stime => timeval,
});</PRE>
<PRE>
struct( timeval => [
tv_secs => '$',
tv_usecs => '$',
]);</PRE>
<PRE>
my $s = new rusage;</PRE>
<LI><STRONG><A NAME="item_Example_2">Example 2</A></STRONG><BR>
<PRE>
package OBJ;
use Class::Template;</PRE>
<PRE>
members OBJ {
'a' => '$',
'b' => '$',
};</PRE>
<PRE>
members OBJ2 {
'd' => '@',
'c' => '$',
};</PRE>
<PRE>
package OBJ2; @ISA = (OBJ);</PRE>
<PRE>
sub new {
my $r = InitMembers( &OBJ::InitMembers() );
bless $r;
}</PRE>
</UL>
<P>
<HR>
<H1><A NAME="notes">NOTES</A></H1>
<PRE>
Use '%' if the member should point to an anonymous hash. Use '@' if the
member should point to an anonymous array.</PRE>
<P>When using % and @ the method requires one argument for the key or index
into the hash or array.</P>
<P>Prefix the %, @, or $ with '*' to indicate you want to retrieve pointers to
the values rather than the values themselves.</P>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> Class::Template - struct/member template builder</P></STRONG>
</TD></TR>
</TABLE>
</BODY>
</HTML>