[ale] Perl coding style

Charles Shapiro hooterpincher at gmail.com
Fri Jan 18 10:43:26 EST 2013


Of course, it might have to do with geezer-coders (like me) who learned C
first. You have to define a subroutine before you can use it in C. You can
either write an explicit function prototype (e.g. "int my_dog_sex(char
*,int);" ) before calling your function, or you can define the whole
function before calling it.  This makes it more convenient to put  your
functions above your main() call, as then you didn't have to type in or
maintain prototype lines in addition to the functions themselves.

-- CHS



On Fri, Jan 18, 2013 at 10:25 AM, Geoffrey Myers <
lists at serioustechnology.com> wrote:

> I don't think it is required. See my last post.
>
>
> --
> From my iPhone
> Geoffrey Myers
>
> On Jan 18, 2013, at 10:21 AM, Jim Kinney <jim.kinney at gmail.com> wrote:
>
> It's required. Not just a "style thing".
>
> Alternatively, put subroutines in external files and call them in from the
> top of the script. My Perl is getting quite rusty but I think it's
>
> require:<file> ;
>
> On Fri, Jan 18, 2013 at 10:12 AM, Geoffrey Myers <
> lists at serioustechnology.com> wrote:
>
>> Not trolling. I didn't want to taint the discussion by specifying my
>> particular style. It does appear to me that most perl code I encounter has
>> subroutines before the main code.
>>
>>
>> --
>> From my iPhone
>> Geoffrey Myers
>>
>> On Jan 18, 2013, at 10:00 AM, Brandon Wood <woody at 2143.net> wrote:
>>
>>   Not sure if you're trolling or looking to have a more specific
>> discussion as "most perl coders" is a bit of a broad statement. There are a
>> LOT of Perl coders, many with different styles. So far as the language
>> itself is concerned you can do it different ways; though there are
>> suggested good practices.
>>
>>   And yes, Perl is still alive and well and in a period of renaissance
>> these last few years. There is an active Perl Mongers group in Atlanta that
>> meets the first Thursday of the month. All are welcome, see
>> http://atlanta.pm.org for more information.
>>
>> --
>> Woody
>>
>> On Fri, Jan 18, 2013 at 9:46 AM, Sam Rakowski <devnull at iamdevnull.info>wrote:
>>
>>> Perl is eternal.
>>> Sent via BlackBerry
>>> _______________________________________________
>>> Ale mailing list
>>> Ale at ale.org
>>> http://mail.ale.org/mailman/listinfo/ale
>>> See JOBS, ANNOUNCE and SCHOOLS lists at
>>> http://mail.ale.org/mailman/listinfo
>>>
>>
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://mail.ale.org/mailman/listinfo/ale
>> See JOBS, ANNOUNCE and SCHOOLS lists at
>> http://mail.ale.org/mailman/listinfo
>>
>>
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://mail.ale.org/mailman/listinfo/ale
>> See JOBS, ANNOUNCE and SCHOOLS lists at
>> http://mail.ale.org/mailman/listinfo
>>
>>
>
>
> --
> --
> James P. Kinney III
> *
> Every time you stop a school, you will have to build a jail. What you gain
> at one end you lose at the other. It's like feeding a dog on his own tail.
> It won't fatten the dog.
> - Speech 11/23/1900 Mark Twain
>
> http://electjimkinney.org
> http://heretothereideas.blogspot.com/
>  *
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20130118/b6d7e5d1/attachment-0001.html>


More information about the Ale mailing list