On Tue, 16 Feb 2010 02:35:03 +0100
Michał Marczyk wrote:
> On 16 February 2010 02:12, Mike Meyer
> wrote:
> > To bad. It's really handy, especially as it starts trickling into
> > system modules. You get one file that provides the simple command line
> > usage plus functions that allow user to g
On Tue, 16 Feb 2010 11:13:28 -0800 (PST)
Daniel Werner wrote:
> On Feb 16, 2:12 am, Mike Meyer 620...@mired.org> wrote:
> > Wouldn't be hard to do, either. Just bind *script-name* (or some such)
> > to the path in script-opt, and let the client decide if it's the same
> > as *file*.
> It would i
On Feb 16, 2:12 am, Mike Meyer wrote:
> Wouldn't be hard to do, either. Just bind *script-name* (or some such)
> to the path in script-opt, and let the client decide if it's the same
> as *file*.
It would indeed be helpful if clojure.main bound a Var to the name of
the .clj file being run, sort o
Mike Meyer wrote:
Is there any way to tell if inside a .clj file if it was invoked as a
script by clojure.main, vs. being loaded for use elsewhere?
Use a shebang line that calls a wrapper script, e.g. clj-script, that
passes a command-line arg to tell the code it's being run as a script.
$
On 16 February 2010 02:12, Mike Meyer
wrote:
> To bad. It's really handy, especially as it starts trickling into
> system modules. You get one file that provides the simple command line
> usage plus functions that allow user to get to advanced usage. It also
> restores functionality that appears t
On Sun, 14 Feb 2010 22:32:45 -0800 (PST)
ataggart wrote:
> On Feb 14, 6:47 pm, Mike Meyer 620...@mired.org> wrote:
> > So, the next question - possibly another name-space question.
> >
> > Is there any way to tell if inside a .clj file if it was invoked as a
> > script by clojure.main, vs. being
On Feb 14, 6:47 pm, Mike Meyer wrote:
> So, the next question - possibly another name-space question.
>
> Is there any way to tell if inside a .clj file if it was invoked as a
> script by clojure.main, vs. being loaded for use elsewhere?
No.
>
> What I'd like to do is make my unit tests usabl
So, the next question - possibly another name-space question.
Is there any way to tell if inside a .clj file if it was invoked as a
script by clojure.main, vs. being loaded for use elsewhere?
What I'd like to do is make my unit tests usable in two modes: While
working on a bug, I'd like to be abl