Re: is there any "hello-world" demo for plugin-based application?
- From: Joost Diepenmaat <joost@xxxxxxxxx>
- Date: Mon, 31 Dec 2007 16:51:03 +0100
John Bokma <john@xxxxxxxxxxxxxxx> writes:
Joost Diepenmaat <joost@xxxxxxxxx> wrote:
eval "use $plugin" or die; # I prefer this over require ... import,
Heh, how about turning
die;
into something like:
die "Couldn't load plug-in: $@";
Because I think
$ perl -e'eval "use Nothing;" or die'
Can't locate Nothing.pm in @INC (@INC contains: ..... .) at (eval 1) line 1.
BEGIN failed--compilation aborted at (eval 1) line 1.
...propagated at -e line 1.
works almost as well.
IOW, because die without arguments propagates $@ already and it's a short
example.
Joost.
.
- References:
- Re: is there any "hello-world" demo for plugin-based application?
- From: Joost Diepenmaat
- Re: is there any "hello-world" demo for plugin-based application?
- From: John Bokma
- Re: is there any "hello-world" demo for plugin-based application?
- Prev by Date: Re: is there any "hello-world" demo for plugin-based application?
- Next by Date: utf-8
- Previous by thread: Re: is there any "hello-world" demo for plugin-based application?
- Next by thread: FAQ 6.17 Why don't word-boundary searches with "\b" work for me?
- Index(es):
Relevant Pages
|