[LA.pm] coding guidlines, inline functions
Jeremy Leader
jleader at alumni.caltech.edu
Tue Dec 7 13:36:58 CST 2004
Ofer Nave wrote:
> 1) coding guidlines
>
> I just finished reading this document entitled "Conventions and Guidelines
> for Parrot Source Code":
>
> http://dev.perl.org/perl6/pdd/pdd07_codingstd.html
>
> Has anyone seen a document similar to this for Perl development?
Damian Conway is working on a book on "Perl Best Practices", which
I believe he said would be published sometime soon. I think it
would be fair to describe the material as conventions and guidelines
for Perl.
> 2) inline functions
>
> Is there any analog in perl to C inline functions (i.e., macros)? In
> other words, is there an elegant way in perl to make things modular for
> code maintenance purposes, but empower the perl parser/compiler to
> optimize away unnecessary function call overhead?
A quick look at CPAN turned up Filter::Macro
(http://cpan.org/authors/id/A/AU/AUTRIJUS/), which is a source filter
for making macros which are expanded inline.
Along the way, I was intrigued to find the "Inline" module
(http://cpan.org/authors/id/I/IN/INGY/), which provides the ability
to write Perl subroutines in other languages (analogous to the
support some C compilers provide for inline assembly language).
--
Jeremy Leader
jleader at alumni.caltech.edu
More information about the Losangeles-pm
mailing list