[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Fri Jul 9 08:36:32 2004 -->
- <!--x-from-r13: syrgpu ng culqrnhk.bet (Tyrgpu) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: 71ABDA88-D0DA-11D8-B457-[email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: BEFA01EA-D0E0-11D8-B457-[email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] programming languages -->
- <li><em>date</em>: Fri Jul 9 08:36:32 2004</li>
- <li><em>from</em>: fletch at phydeaux.org (Fletch)</li>
- <li><em>in-reply-to</em>: <<a href="msg00248.html">[email protected]</a>> (Christopher Fowler's message of "08 Jul 2004 11:07:53 -0400")</li>
- <li><em>references</em>: <<a href="msg00240.html">[email protected]</a>> <<a href="msg00241.html">[email protected]</a>> <<a href="msg00242.html">[email protected]</a>> <<a href="msg00248.html">[email protected]</a>></li>
- <li><em>subject</em>: [ale] programming languages</li>
Christopher> I like to break up each of my C functions or group of
Christopher> functions into files. With Perl I have a hard time
Christopher> doing this. I guess I just do not know how. I could
Christopher> treat perl like a full OOP approach then every piece
Christopher> of code must be in a class.
In "Package1.pm":
package Package1;
sub foo { ... }
1;
Then "Package2.pm":
package Package2;
sub bar { ... }
sub baz { ... }
1;
Make sure the directory containing those .pms is in PERL5LIB (or add
an appropriate 'use lib "whereever"' line, or use -I on the command
line) and just 'use Package1;' and call Package1::foo( ... ). If you
don't want to fully qualify names every time, read perldoc Exporter
(and see perldoc perlmod for more details on writing modules OOP or
no).
--
Fletch | "If you find my answers frightening, __`'/|
fletch at phydeaux.org | Vincent, you should cease askin' \ o.O'
| scary questions." -- Jules =(___)=
| U
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00240" href="msg00240.html">[ale] programming languages</a></strong>
<ul><li><em>From:</em> ryan at jimmyether.com (Ryan Williams)</li></ul></li>
<li><strong><a name="00241" href="msg00241.html">[ale] programming languages</a></strong>
<ul><li><em>From:</em> rsowen at speedfactory.net (Bob Owen)</li></ul></li>
<li><strong><a name="00242" href="msg00242.html">[ale] programming languages</a></strong>
<ul><li><em>From:</em> ryan at jimmyether.com (Ryan Williams)</li></ul></li>
<li><strong><a name="00248" href="msg00248.html">[ale] programming languages</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00276.html">[ale] Perl + Semaphores</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00278.html">[ale] Bogus Email From Earthlink Billing</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00248.html">[ale] programming languages</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00243.html">[ale] programming languages</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00277"><strong>Date</strong></a></li>
<li><a href="threads.html#00277"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>