From: Anuj on
Hi,

Can anybody please tell why we should use packages instead of using
source command directly? Internally packages are also sourcing files.
If we our code is split into multiple files then those can be sourced
in just one single file and this single file people can source in
there code. So what are we gaining by using packages? Is it just the
simpler looking interface or do packages actually have some
advantages?

I searched on internet but couldn't find any information on it.
So please share your ideas on it.

From: Donal K. Fellows on
On 2 Jan, 12:07, Anuj <goyal.anujku...(a)gmail.com> wrote:
> Can anybody please tell why we should use packages instead of using
> source command directly?

Because the package manager looks after versioning for you. You don't
have to know how a package works internally, just what it is called
and what version(s) you want. This is easier for library code, much
much easier.

You don't need to use packages for application-specific code. They're
only really useful when the file is going to need to be sourced or
loaded from multiple programs.

Donal.
From: Anuj on
On Jan 2, 6:36 pm, "Donal K. Fellows"
<donal.k.fell...(a)manchester.ac.uk> wrote:
> On 2 Jan, 12:07, Anuj <goyal.anujku...(a)gmail.com> wrote:
>
> > Can anybody please tell why we should use packages instead of using
> > source command directly?
>
> Because the package manager looks after versioning for you. You don't
> have to know how a package works internally, just what it is called
> and what version(s) you want. This is easier for library code, much
> much easier.
>
> You don't need to use packages for application-specific code. They're
> only really useful when the file is going to need to be sourced or
> loaded from multiple programs.
>
> Donal.

Thanks Donal for your inputs.
But versioning can be achieved easily using source command. By
versioning we mean that we are providing upgraded version of code. In
case of packages we'll be providing different set of files whenever
version changes and similar thing can be done easily using source
files also.
Am I missing something?

Also can you please elaborate a bit for what you said that packages
will be helpful when file is sourced from multiple programs.
It'll be really helpful if you can give some example.

Thanks a lot in advance.
From: M. Strobel on
Anuj schrieb:
> Hi,
>
> Can anybody please tell why we should use packages instead of using
> source command directly? Internally packages are also sourcing files.
> If we our code is split into multiple files then those can be sourced
> in just one single file and this single file people can source in
> there code. So what are we gaining by using packages? Is it just the
> simpler looking interface or do packages actually have some
> advantages?
>
> I searched on internet but couldn't find any information on it.
> So please share your ideas on it.
>

Packages are convenient, you do not have to track versions or file locations.

You are free to use the source command.

I noticed when my applications got bigger, I organized the "utility, helper and library functions"
into packages, taking care to have the package version in sync with the cvs version.

My code is now "source" free.

/Str.
From: Robert Heller on
At Sat, 2 Jan 2010 05:36:09 -0800 (PST) "Donal K. Fellows" <donal.k.fellows(a)manchester.ac.uk> wrote:

>
> On 2 Jan, 12:07, Anuj <goyal.anujku...(a)gmail.com> wrote:
> > Can anybody please tell why we should use packages instead of using
> > source command directly?
>
> Because the package manager looks after versioning for you. You don't
> have to know how a package works internally, just what it is called
> and what version(s) you want. This is easier for library code, much
> much easier.
>
> You don't need to use packages for application-specific code. They're
> only really useful when the file is going to need to be sourced or
> loaded from multiple programs.

It does help as a way of keeping code libraries organized, even when the
code might not be loaded by mulitple programs.

>
> Donal.
>

--
Robert Heller -- Get the Deepwoods Software FireFox Toolbar!
Deepwoods Software -- Linux Installation and Administration
http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
heller(a)deepsoft.com -- Contract Programming: C/C++, Tcl/Tk