Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Using subroutine between scripts

by ChrisR (Hermit)
on Nov 07, 2003 at 16:30 UTC ( [id://305354]=note: print w/replies, xml ) Need Help??


in reply to Re: Using subroutine between scripts
in thread Using subroutine between scripts

I always use the shebang line in my libraries but it does make sense that you don't need it since the library should never be used by itself. Can you think of any problems that my arise from having the shebang in a library?
  • Comment on Re: Re: Using subroutine between scripts

Replies are listed 'Best First'.
Re: Re: Re: Using subroutine between scripts
by sgifford (Prior) on Nov 07, 2003 at 18:56 UTC
    I also often put a shebang in my libraries. It can be helpful to text editors in figuring out what kind of file it is. Emacs, for example, can infer the file type by looking at the first few characters. If I create a Perl library starting with a shebang line, Emacs will open it in Perl mode, regardless of the filename. I've been doing this for years and have never had any problems with it.
Re: Re: Re: Using subroutine between scripts
by Ninthwave (Chaplain) on Nov 07, 2003 at 18:10 UTC

    No not really but I was just taught you don't need the shebang line so I never put it in. I personally see the shebang line as the beginning of a script so I leave it out of libraries. I would ask other monks if there are any problems with including it but I can't think of any.

    "No matter where you go, there you are." BB

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-25 06:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found