[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using a perl lib from postinst

Patrick Matthäi <pmatthaei@debian.org> writes:
> Tollef Fog Heen schrieb:
>> ]] Dominique Dumont
>> | Since the postinst is a shell script, you cannot call directly the
>> | perl lib.
>> Postinsts can be written in any language, including perl, so he could
>> just write it in perl and use the relevant module.
> Yep and what is with:
> #!/bin/sh
> # some foo to be inserted here
> perl -e -MMy::Module 'My::Module->do_something_nasty();'

Er, it wasn't in Debian, but in a couple of bits of my private packaging I did
something akin to that in order to use the debhelper shell script injected
into the postinst easily.

Given that one line of Perl was required it looked the nicer strategy, and
less prone to break strangely if the debhelper shell code did something


✣ Daniel Pittman            ✉ daniel@rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons

Reply to: