Re: Why should package declaration match filename?

2008-03-15 Thread Michael G Schwern
Dave Rolsky wrote: There's a lot of value in following the existing best practices of the Perl community as a whole. For one thing, it means you can hire people with Perl experience and they can bring that experience to bear on your application. If you insist on reinventing every wheel,

Re: Why should package declaration match filename?

2008-03-15 Thread David Cantrell
On Fri, Mar 14, 2008 at 12:20:40PM -0700, Matisse Enzer wrote: What are other good reasons to have package declarations match file paths? Because it's what everyone does and there are no good reasons to *not* do it. -- David Cantrell | Official London Perl Mongers Bad Influence

Re: Why should package declaration match filename?

2008-03-15 Thread Matisse Enzer
On Mar 15, 2008, at 6:45 AM, David Cantrell wrote: On Fri, Mar 14, 2008 at 12:20:40PM -0700, Matisse Enzer wrote: What are other good reasons to have package declarations match file paths? Because it's what everyone does and there are no good reasons to *not* do it. With all due respect

Re: Why should package declaration match filename?

2008-03-15 Thread David Cantrell
On Sat, Mar 15, 2008 at 09:00:27AM -0700, Matisse Enzer wrote: On Mar 15, 2008, at 6:45 AM, David Cantrell wrote: On Fri, Mar 14, 2008 at 12:20:40PM -0700, Matisse Enzer wrote: What are other good reasons to have package declarations match file paths? Because it's what everyone does and there

Why should package declaration match filename?

2008-03-14 Thread Matisse Enzer
I'm discussing some potential refactorings at $work at wanted to give an articulate explanation of the benefits of having package declarations match file names, so that: # file is Foo/bar.pm package Foo::Bar; One reason is so that when you see a package statement, you know what the

Re: Why should package declaration match filename?

2008-03-14 Thread Eric Wilhelm
# from Matisse Enzer # on Friday 14 March 2008 12:20: and when you see a   use statement, you know what the corresponding package is, and have   a good clue about the path path of the file you are importing. Well, a use statement literally defines the name of the file (per `perldoc -f

Re: Why should package declaration match filename?

2008-03-14 Thread Michael G Schwern
Matisse Enzer wrote: I'm discussing some potential refactorings at $work at wanted to give an articulate explanation of the benefits of having package declarations match file names, so that: # file is Foo/bar.pm package Foo::Bar; That was probably a typo, but I hope you mean

Re: Why should package declaration match filename?

2008-03-14 Thread Matisse Enzer
On Mar 14, 2008, at 6:53 PM, Michael G Schwern wrote: Matisse Enzer wrote: # file is Foo/bar.pm package Foo::Bar; That was probably a typo, Yes, a typo. Sorry to muddy the waters. Eric already covered the import() issue. Yes, and thank you Eric - I did not know that. There's

Re: Why should package declaration match filename?

2008-03-14 Thread Dave Rolsky
On Fri, 14 Mar 2008, Matisse Enzer wrote: I'm discussing some potential refactorings at $work at wanted to give an articulate explanation of the benefits of having package declarations match file names, so that: # file is Foo/bar.pm package Foo::Bar; One reason is so that when you see a