Re: is there any "hello-world" demo for plugin-based application?



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.

.



Relevant Pages

  • Re: Reloading - brass jammed in sizing die
    ... The second brass casing I pushed in to the sizing die went in real ... case sits on the ladge over the bench as a reminder to lube cases ... ... Heh, heh, I'm pretty sure my dog is a liberal - he has no balls. ...
    (rec.crafts.metalworking)
  • Re: Reloading - brass jammed in sizing die
    ... The second brass casing I pushed in to the sizing die went in real ... case sits on the ladge over the bench as a reminder to lube cases ... ... Heh, heh, I'm pretty sure my dog is a liberal - he has no balls. ...
    (rec.crafts.metalworking)
  • Re: Torture - A lawful good act?
    ... If stem cells can do ... Didn't he die? ... And his wife? ... Heh. ...
    (rec.games.frp.dnd)
  • Re: Fergie from The Black-Eyed Peas
    ... A man drink like that and he don't eat, he is going to DIE, ... ever had from the Autard Scout board? ... This is turning into ... bizarre. ...
    (rec.sport.football.college)
  • Re: Assisted dying
    ... I remember, as a child, my father having to take the decision re his own ... And as Boo says - once it's law, there is no turning back. ... I wouldn't want some Dr 'letting' me die just cos they need my ...
    (uk.people.silversurfers)