Thanks for support!
]]>That's strange, but it doesn't update PATH when I run it by hand.
That's normal -- by running it you create a new shell, and when the script returns, everything in regards to the environment disappears (in this case: global variables). If you want the script to run in current shell, you need to run it with the dot (or source in Bash).
A little demo:
$ echo 'export TESTVAR=yup' >test.sh
$ chmod +x test.sh
$ echo $TESTVAR
$ ./test.sh
$ echo $TESTVAR
$ . test.sh
$ echo $TESTVAR
yup
Uhh, but it dosn't work from .install .
/etc/profile.d/* gets sourced at every login. You just need to relogin (after installing) to have the variable in your profile environment (i.e. every shell you open).
]]>//edit
OK, I'm stupid. Didn't use source, like msthev said;).
//edit
Uhh, but it dosn't work from .install .
]]>Edit: Didn't see a reply was made already rule#1 never post before waking up properly le sigh.
]]>By the way, I think all you need to do in case of your script is relogin / source /etc/profile.d/perlbin.sh:
$ cat /etc/profile.d/perlbin.sh
# Set path to perl scriptdirs if they exist
# https://wiki.archlinux.org/index.php/Perl_Policy#Binaries_and_Scripts
# Added /usr/bin/*_perl dirs for scripts
# Remove /usr/lib/perl5/*_perl/bin in next release
[ -d /usr/bin/site_perl ] && PATH=$PATH:/usr/bin/site_perl
[ -d /usr/lib/perl5/site_perl/bin ] && PATH=$PATH:/usr/lib/perl5/site_perl/bin
[ -d /usr/bin/vendor_perl ] && PATH=$PATH:/usr/bin/vendor_perl
[ -d /usr/lib/perl5/vendor_perl/bin ] && PATH=$PATH:/usr/lib/perl5/vendor_perl/bin
[ -d /usr/bin/core_perl ] && PATH=$PATH:/usr/bin/core_perl
export PATH
# If you have modules in non-standard directories you can add them here.
#export PERLLIB=dir1:dir2
$ pacman -Qo /etc/profile.d/perlbin.sh
/etc/profile.d/perlbin.sh is owned by perl 5.16.2-2