Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!sraco1!sakoh From: sakoh@sraco2.us.sra.co.jp (Hiroshi &) Newsgroups: comp.lang.perl Subject: operl - an experimental object-oriented package for perl Message-ID: Date: 21 Feb 91 00:24:26 GMT Sender: usenet@sraco1.us.sra.CO.JP Organization: Software Research Associates, Inc. Boulder Lab. Lines: 264 Hello, folks. Now we have an object-oriented perl! (please allow me to call it OPERL). Does it sound funny or insane :-) ? As usual oo-languages, you can define classes and create instances. Each instance can maintain its internal states independently. Of course, it supports inheritance. Since It's totally written in perl, you don't have to change perl itself at all. Although I tested the package on perl3.41, perl3.44 and perl4.0 only, it should work on earlier versions if package feature works correctly. Distribution kit is uuencoded since operl.pl contains control characters. Sorry for no documents, however, you might find the way to use this package easily at a glance (please refer to the samples). There should be many way to improve the package. Any comments are welcome. By the way, I'd like to pass a scalar variable as an argument of 'package' on execution time. Is it a bad idea to have like: sub sub1 { package $context; .... } ?? It would improve the performance of this package, since I could avoid to use extra eval. Hiroshi Sakoh sakoh@sra.co.jp or uunet!sraco1!sakoh ----------------------------------------------- begin 664 operl.shar M(R$O8FEN+W-H"B,@5&AI2!S879I;F<@:70@:6X@82!F:6QE(&%N9"!T>7!I;F<@(G-H(&9I;&4B+@HC M"B,@5W)A<'!E9"!B>2`@;VX@5V5D($9E8B`R,"`Q-CHU,CHR-"!-4U0@,3DY M,0HC($-O;G1E;G1S.B`@8F%G+G!L('-E="YP;"!P;VEN="YP;"!S=&%C:RYP M;"!O<&5R;"YP;"!S86UP;&4Q('-A;7!L93(@"`M(&)A9RYP;`IS960@)W,O7D`O+R<@/B`B8F%G M+G!L(B`\/"=`+R]%*D\J1B!B86R1?6S!= M?2LK.R2R1? M6S!=?2`\/2`P.RF4G+"`@("`@)V9OR1S=6T@*ST@ M)&X[?3LD0"\O)R`^(")S970N<&PB(#P\)T`O+T4J3RI&('-E="YP;"\O)PHC(2]U MR1?6S!=?3TQ.R'@@/2!D969I;F5D*"1?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AB@D;V)J96-T+"!`7RD[("`@(R!S=6)R;W5T:6YE(&-A;&P* M("`@('!R:6YT("1`("X@(EQN(B!U;FQE2P@)'9A;"D@/2!E86-H("5S=7!ER=R;V]T)WT@/2`GR1O<&5R;"=M>6-L87-S>R1S96QF?7T@+B`B7&XB M.PH@("`@("`F;6%I;B=D=6UP=F%R*"1S96QF*3L*("$I.R`C('-E;&8@9'5M M<`H*,3L*0"\O12I/*D8@;W!E"`M('-A;7!L93$*"QG/7)W>"QO/7)X('-A;7!L93$*(`IE8VAO('@@ M+2!S86UP;&4R"G-E9"`G0"\O)R`^(")S86UP;&4R(B`\/"=`+R]%*D\J M1B!S86UP;&4R+R\G"B,A+W5S"QG/7)W>"QO/7)X('-A;7!L93(*(`IE8VAO M('@@+2!S86UP;&4S"G-E9"`G0"\O)R`^(")S86UP;&4S(B`\/"=`+R]% M*D\J1B!S86UP;&4S+R\G"B,A+W5S22"!S86UP;&4S"B`* M96-H;R!X("T@"`M('-A;7!L934*"!S86UP;&4U"B`*97AI="`P"F4U ` end -- sakoh@sra.co.jp "Whereof one cannot speak, thereof one must remain silent." ---Wittgenstein "Sometimes noise is significant." ---William Hewlett