Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Naming of a module reading /proc

by Erik Hensema (Sexton)
on Nov 21, 2001 at 01:08 UTC ( [id://126644]=perlquestion: print w/replies, xml ) Need Help??

Erik Hensema has asked for the wisdom of the Perl Monks concerning the following question:

I'm writing a module which reads and interprets a file from the Linux /proc filesystem. I'm saying Linux /proc filesystem because it's a Linux-specific file.

I have searched CPAN for similar modules but only found a few which did some generic /proc stuff, not really Linux specific.

The file is /proc/net/ip_conntrack, by the way. It holds state information for the netfilter firewall in the 2.4 kernels.

Should I name my module proc::net::ip_conntrackLinux::netfilter::conntrack, or something completely different?

Replies are listed 'Best First'.
(jeffa) Re: Naming of a module reading /proc
by jeffa (Bishop) on Nov 21, 2001 at 01:22 UTC
    I'd go with Proc::IP_Conntrack or maybe Proc::NetFilter::State. At any rate, be sure and add some upper case letters in the name, don't use all lower case.

    Category >> Operating System Interfaces >> Proc might be a good home for it as well.

    You can always mention that it is a Linux specific module in it's Description.

    jeffa

Re: Naming of a module reading /proc
by mortis (Pilgrim) on Nov 21, 2001 at 04:14 UTC
    The CPAN mantainers don't like module names that consist of lowercase letters for the simple reason that they may clash with reserved words (pragmas in particular) at some future date.

    use strict;

    Is the oft cited example.

    Cagetory 40 - Operating System Interfaces already has the precedent that OS specific modules start with a namespace appropraite for the OS - in this case Linux. I'd suggest going with that.

Re: Naming of a module reading /proc
by Beatnik (Parson) on Nov 21, 2001 at 14:33 UTC
    There is a FileSys namespace on CPAN too. Since /proc is pretty virtual, it's an option to use that namespace.

    Greetz
    Beatnik
    ... Quidquid perl dictum sit, altum viditur.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://126644]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-03-28 19:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found