Re: Namespace for an application?
Mark Stosberg wrote: > What happens if an application is composed of 3 scripts and 3 new > modules? Do the modules go into the modules directory and the scripts > into the scripts directory? No, that wouldn't make any sense. Unless, of course, the modules have general applicability outside the context of the application in question. Even so, an application should be archived as one big piece -- which, last I heard, the scripts archive was not quite capable of. > If application modules end up in the scripts > directory, don't we still have potentional for namespace conflicts Yes, theoretically. But that's a good reason why each application should have its own top-level namespace. As long as the application has a suitably unique name, and not something dumb like "HTML" or "CGI", there should be no conflicts. Application names like "Alzabo" are certainly distinct enough. All IMHO, of course... -- John Porter
Re: Namespace for an application?
"François Désarménien" wrote: > > I see your point of view. In fact, the current modules hierarchy is under the > 'modules' directory, which means that we should only have _modules_ in the > root namespace. Ideally, like we have a 'script' directory, we should have > an 'application' directory. What happens if an application is composed of 3 scripts and 3 new modules? Do the modules go into the modules directory and the scripts into the scripts directory? If application modules end up in the scripts directory, don't we still have potentional for namespace conflicts if the application uses it's own "Crazy::Horse" module, and that's already in use in the modules directory? -mark http://mark.stosberg.com/
Re: Namespace for an application?
François Désarménien writes: > Thu, 28 Jun 2001 12:28:18 -0500 (CDT) > Dave Rolsky <[EMAIL PROTECTED]> wrote: > > Is there any consensus in the Perl community on a namespace for apps? > > Perhaps Apps::*? > > I'd rather prefer the singular form "App::" which seems more logical > when I use _an_ application... IMHO applications don't require assigned namespaces -- what's the point? If all applications use a top-level namespace (main:: is well qualified) then I don't see any conflicts with modules. If an application is built around a primary module of functionality then we're not talking about the "application" as the module. In this case I don't think App::Tracker is useful -- it's not descriptive and not unique enough to reduce the chance of conflict. I'd say use "Tracker" for the application namespace and put the core modules somewhere else. I have no suggestions since I don't know what the core modules do... - Ken
Re: Namespace for an application?
François Désarménien wrote: > Ideally, like we have a 'script' directory, we should have > an 'application' directory. > > But the drawback is that this would require another maintainer, while creating > a pseudo 'App' root namespace would let the current PAUSE engine process them > without any further investment. I think what would happen, and will, Real Soon Now, is that the 'scripts' archive will allow whole multi-file applications, including their supporting modules. All a 'script' really is, is a single-file application. -- John Porter
Re: Namespace for an application?
Fri, 29 Jun 2001 08:54:46 -0400 John Porter <[EMAIL PROTECTED]> wrote: > François Désarménien wrote: > > I think it's agood idea not to fragment too much the root namespace, and Apps > > (or App) is generic enough for other applicative contributions. > > But that's exactly the problem: Apps:: is wayy too generic to be > meaningful. We may as well put ALL modules under a Modules:: > top-level. I see your point of view. In fact, the current modules hierarchy is under the 'modules' directory, which means that we should only have _modules_ in the root namespace. Ideally, like we have a 'script' directory, we should have an 'application' directory. But the drawback is that this would require another maintainer, while creating a pseudo 'App' root namespace would let the current PAUSE engine process them without any further investment. Andrea ? Thoughts ? François
Re: Namespace for an application?
François Désarménien wrote: > I think it's agood idea not to fragment too much the root namespace, and Apps > (or App) is generic enough for other applicative contributions. But that's exactly the problem: Apps:: is wayy too generic to be meaningful. We may as well put ALL modules under a Modules:: top-level. -- John Porter
Re: Namespace for an application?
Thu, 28 Jun 2001 12:28:18 -0500 (CDT) Dave Rolsky <[EMAIL PROTECTED]> wrote: > Is there any consensus in the Perl community on a namespace for apps? > Perhaps Apps::*? > I'd rather prefer the singular form "App::" which seems more logical when I use _an_ application... François
Re: Namespace for an application?
Thu, 28 Jun 2001 15:38:15 -0500 Mark Stosberg <[EMAIL PROTECTED]> wrote: > > > We could, alternatively, use Tracker. I like that cause its less typing. > > I prefer Apps::Tracker for being more descriptive. > So do I. I think it's agood idea not to fragment too much the root namespace, and Apps (or App) is generic enough for other applicative contributions. But I definitly don't find it any descriptive : "traker" is too generic IMHO. François