#Perlbrew
Explore tagged Tumblr posts
Text
Textmate and Perlbrew
Textmate is a marvelous text editor for programming and other text based tasks on OSX. It even has a great extension for assisting when programming Perl. One of the really helpful features is a syntax validation happening when a file is saved.
Take for example this incomplete Perl source file below
If you specify the contents as perl (see the bottom of the window) or let Textmate resolve this…
View On WordPress
0 notes
Photo

PerlTricks Interview With Me https://t.co/64pZKmezs9 #sed1line #cygwin #rxrx #profilepicture #ascii #oneliner #wwwmechanize #perlbrew #raft #winbash #emacs #perltricks #vimplugins #perl1line #perlcritic #powershell #vim #awk #surround #windows #awk1line #interview
0 notes
Link
Hi Guys. I am on Centos 7 and installed a new version of Perl using PerlBrew so i can use a different version.
I am trying to install Virtualmin and run into the following issue.
Can't locate Virtualmin/Config.pm in @INC (you may need to install the Virtualmin:
:Config module) (@INC contains: /root/perl5/perlbrew/perls/perl-5.30.0/lib/site_perl/5.30.0/x86_64-linux /root/perl5/perlbrew/perls/perl-5.30.0/lib/site_perl/5.30.0 /root/perl5/perlbrew/perls/perl-5.30.0/lib/5.30.0/x86_64-linux /root/perl5/perlbrew/perls/perl-5.30.0/lib/5.30.0) at /usr/bin/virtualmin-config-system line 9.
folled by
The following errors occurred during installation:
◉ Postinstall configuration returned an error.
[WARNING] The last few lines of the log file were:
Memory : 136 M RSS (356 MB VSZ)
Started: Fri Aug 23 17:23:33 2019 – 00:23 ago
State : Running, pid: 15456
Cleaning repos: base centos-sclo-rh centos-sclo-sclo elrepo epel extras
: mariadb-main mariadb-maxscale mariadb-tools nginx remi-php71
: remi-safe updates virtualmin virtualmin-universal
Cleaning up list of fastest mirrors
Other repos take up 10 M of disk space (use –verbose for details)
Cleaning up software repo metadata: Success.
Spin pid is: 16691
Installing updates to Virtualmin-related packages: Success.
[2019-08-23 17:24:00 CEST] [DEBUG] Phase 3 of 3: Configuration
[2019-08-23 17:24:00 CEST] [DEBUG] Cleaning up temporary files in /tmp/.virtualmin-12467.
[2019-08-23 17:24:00 CEST] [WARNING] The following errors occurred during installation:
[2019-08-23 17:24:00 CEST] [WARNING] The last few lines of the log file were: –– nothing showing there
This is the content of what i see in the file /usr/bin/virtualmin-config-system
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010_001;
use Getopt::Long;
BEGIN { $Pod::Usage::Formatter = ‘Pod::Text::Color’; }
use Pod::Usage qw(pod2usage);
use Term::ANSIColor qw(:constants);
use Virtualmin::Config;
Should my #! path not point to /root/perl5/perlbrew/perls/perl-5.30.0/bin/perl (that return path from which perl command). It is also using a wrong version 5.010_00 , shipped default on the OS is 5.16.xx
This is extract from the Install.sh script
# Make sure Perl is installed
printf "Checking for Perl..." >> $log
# loop until we've got a Perl or until we can't try any more
while true; do
perl="$(which perl 2>/dev/null)"
if [ -z "$perl" ]; then
if [ -x /root/perl5/perlbrew/perls/perl-5.30.0/bin/perl ]; then
perl=/root/perl5/perlbrew/perls/perl-5.30.0/bin/perl
break
#elif [ -x /usr/local/bin/perl ]; then
# perl=/usr/local/bin/perl
#break
elif [ -x /opt/csw/bin/perl ]; then
perl=/opt/csw/bin/perl
break
elif [ "$perl_attempted" = 1 ] ; then
printf "${RED}Perl could not be installed - Installation cannot continue.${NORMAL}\\n"
exit 2
fi
# couldn't find Perl, so we need to try to install it
echo 'Perl was not found on your system - Virtualmin requires it to run.'
echo 'Attempting to install it now.'
if [ -x /usr/bin/dnf ]; then
dnf -y install perl >> $log
elif [ -x /usr/bin/yum ]; then
yum -y install perl >> $log
You can see above i have even changed the perl path before re-running script
if [ -x /root/perl5/perlbrew/perls/perl-5.30.0/bin/perl ];
It was previously if [ -x /usr/bin/perl ]; by default. the path of Perl CENTOS installed one
What am i missing ? especially when the Perl environment is also set . see output of echo $PATH
]# echo $PATH
/root/perl5/perlbrew/bin:/root/perl5/perlbrew/perls/perl-5.30.0/bin:/usr/local/openssl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
[
Submitted August 23, 2019 at 09:36AM by Klassbond https://www.reddit.com/r/webhosting/comments/cugc5r/help_virtualmin_install_issue_using_perl_5300_i/?utm_source=ifttt
from Blogger http://webdesignersolutions1.blogspot.com/2019/08/help-virtualmin-install-issue-using.html via IFTTT
0 notes
Link
0 notes
Text
Auto set perlbrew with bash and git
I've started using the lib feature of perlbrew with all of my perl projects. I create a local::lib for each project and switch using 'perlbrew use' accordingly.
The following bash script aliases 'cd' so that when I switch to a git directory the correct perlbrew lib is automatically set.
To accomplish this I set two custom git config parameters:
mydata.perlbrew.perl mydata.perlbrew.lib
If I want to use perl version 5.14.2 and a local::lib called 'myproject'
git config mydata.perlbrew.perl perl-5.14.2 git config mydata.perlbrew.lib myproject
I use git config mostly out of laziness. The git command already knows how to figure out when you are in a repository at any directory level so I save having to write that code in shell script.
Gist
function cd_func () { builtin cd "$@" wanted_perl=$(git config mydata.perlbrew.perl 2>/dev/null) if ([ -n "$wanted_perl" ]); then wanted_lib=$(git config mydata.perlbrew.lib 2>/dev/null) perlbrew_cmd="perlbrew use $wanted_perl@$wanted_lib" if ([ -n "$wanted_lib" ]); then if ([ -n "$PERLBREW_PERL" ] && [ -n "$PERLBREW_LIB" ]); then if [ $PERLBREW_PERL != $wanted_perl ] || [ $PERLBREW_LIB != $wanted_lib ]; then ${perlbrew_cmd} fi else ${perlbrew_cmd} fi fi elif ([ -n "$PERLBREW_PERL" ] && [ -n "$PERLBREW_LIB" ]); then perlbrew_cmd="perlbrew use perl-5.14.2@myperl" ${perlbrew_cmd} fi } alias cd=cd_func
You will notice that I have a base lib called 'myperl' that I switch to whenever I am not working in a Git repository. It will only set this value if PERLBREW_PERL and PERLBREW_LIB are not already set. This allows me to use perlbrew freely outside of git repositories.
44 notes
·
View notes
Text
Perlbrew を利用したプロダクション環境構築
2011.11.05 carton追記
2011.12.07 スクリプトに追加するPATHの記述を修正
2011.12.09 perlbrewのURL変更
Tips: 複数の案件が同居する "開発環境" では perlbrew lib 使うとライブラリパスを簡単に切り替えることができて便利だぞ!
アプリケーションユーザーを作成
# useradd app-user # cat /etc/passwd ... app-user:x:1001:1001::/home/app-user:/bin/bash # cat /etc/shadow ... app-user:!!:15266:0:99999:7:::
これで次のような状態のユーザーが作成されるぞ。
パスワード未設定
/home/app-user
/bin/bash
一般ユーザーの su は NG
SSH, Telnet でのログインも NG
app-user で環境構築
ユーザー app-user に変更して...
# su - app-user
perlbrew をインストールしてから...
$ curl -kL http://install.perlbrew.pl | bash $ echo 'source ~/perl5/perlbrew/etc/bashrc' >> ~/.bashrc $ source ~/.bashrc $ perlbrew list ...
cpanm をインストールして...
$ perlbrew install-cpanm
perl をインストールして有効化。
$ perlbrew available ... $ perlbrew install perl-<VERSION> ... $ perlbrew switch perl-><VERSION>
アプリケーションのデプロイ
でぷろい!cpanm --installdepsで依存モジュールをインストールするんだ!
carton
開発環境でcartonを使ってモジュール管理していた場合はアプリケーションパッケージにcarton.lockがあるはずだ。 この場合はcarton installで依存モジュールをインストールできるぞ!
cartonを使うと開発環境と同じバージョンのモジュールがインストールされる。 「コードは一切変更がないのにデプロイしたらエラーが出る」なんてことが少なくなると思うぞ。開発環境と本番環境で容易にモジュールのバージョンを合わせることができるんだ。
carton install するとデフォルトでは local/ にモジュールがインストールされる。 perlスクリプト内で use lib するか perl -Ilocal/lib などでライブラリパスを通すのを忘れちゃダメだぞ!
cartonはまだ開発中ということで今後に期待だ。はやくcarton bundleを使いたいぞ。
アプリケーション実行スクリプト(daemontools の run スクリプトなど)
最後に実行スクリプトに perlbrew でインストールした perl のパスを追加して完了だ。
PATHに追加するperlbrewと利用するperlのパスは $PERLBREW_ROOT, $PERLBREW_PERL で確認するんだ!
ちなみに現在perlbrewを使って使用しているperlのバスは $PERLBREW_ROOT/perls/$PERLBREW_PERL/bin だぞ!
... export PATH=/home/app-user/perl5/perlbrew/bin:/home/app-user/perl5/perlbrew/perls/perl-5.14.1/bin:${PATH} exec setuidgid app-user ...
3 notes
·
View notes
Text
German Perl Workshop 2013
German Perl Workshop 2013

This is one of those blogposts, that should have been written on the plane home or on the hotel during the conference, but with too much going on and a load of work upon returning to work, it got delayed. This is an all too common pattern for me.
Anyway to get on subject, I have just attended my first German Perl Workshopever. I decided to go when I saw it was in Berlin. Berlin is fairly close to…
View On WordPress
#app-timetracker#berlin#carton#corion#domm#event#github#gpw2013#perl#puppet-perlbrew#rhaen#workshop#zeromq#zmq
0 notes
Photo

PerlTricks Interview With Me https://t.co/64pZKmezs9 #sed1line #cygwin #rxrx #profilepicture #ascii #oneliner #wwwmechanize #perlbrew #raft #winbash #emacs #perltricks #vimplugins #perl1line #perlcritic #powershell #vim #awk #surround #windows #awk1line
0 notes
Text
今って perlbrew で cpanm 入れるコマンドあるんだ?
perlbrew install-cpanm
知らんかった。もしかして最初から?
0 notes
Text
HELP : Virtualmin install issue using Perl 5.30.0 i
Hi Guys. I am on Centos 7 and installed a new version of Perl using PerlBrew so i can use a different version.
I am trying to install Virtualmin and run into the following issue.
Can't locate Virtualmin/Config.pm in @INC (you may need to install the Virtualmin:
:Config module) (@INC contains: /root/perl5/perlbrew/perls/perl-5.30.0/lib/site_perl/5.30.0/x86_64-linux /root/perl5/perlbrew/perls/perl-5.30.0/lib/site_perl/5.30.0 /root/perl5/perlbrew/perls/perl-5.30.0/lib/5.30.0/x86_64-linux /root/perl5/perlbrew/perls/perl-5.30.0/lib/5.30.0) at /usr/bin/virtualmin-config-system line 9.
folled by
The following errors occurred during installation:
◉ Postinstall configuration returned an error.
[WARNING] The last few lines of the log file were:
Memory : 136 M RSS (356 MB VSZ)
Started: Fri Aug 23 17:23:33 2019 - 00:23 ago
State : Running, pid: 15456
Cleaning repos: base centos-sclo-rh centos-sclo-sclo elrepo epel extras
: mariadb-main mariadb-maxscale mariadb-tools nginx remi-php71
: remi-safe updates virtualmin virtualmin-universal
Cleaning up list of fastest mirrors
Other repos take up 10 M of disk space (use --verbose for details)
Cleaning up software repo metadata: Success.
Spin pid is: 16691
Installing updates to Virtualmin-related packages: Success.
[2019-08-23 17:24:00 CEST] [DEBUG] Phase 3 of 3: Configuration
[2019-08-23 17:24:00 CEST] [DEBUG] Cleaning up temporary files in /tmp/.virtualmin-12467.
[2019-08-23 17:24:00 CEST] [WARNING] The following errors occurred during installation:
[2019-08-23 17:24:00 CEST] [WARNING] The last few lines of the log file were: -- nothing showing there
This is the content of what i see in the file /usr/bin/virtualmin-config-system
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010_001;
use Getopt::Long;
BEGIN { $Pod::Usage::Formatter = 'Pod::Text::Color'; }
use Pod::Usage qw(pod2usage);
use Term::ANSIColor qw(:constants);
use Virtualmin::Config;
Should my #! path not point to /root/perl5/perlbrew/perls/perl-5.30.0/bin/perl (that return path from which perl command). It is also using a wrong version 5.010_00 , shipped default on the OS is 5.16.xx
This is extract from the Install.sh script
# Make sure Perl is installed
printf "Checking for Perl..." >> $log
# loop until we've got a Perl or until we can't try any more
while true; do
perl="$(which perl 2>/dev/null)"
if [ -z "$perl" ]; then
if [ -x /root/perl5/perlbrew/perls/perl-5.30.0/bin/perl ]; then
perl=/root/perl5/perlbrew/perls/perl-5.30.0/bin/perl
break
#elif [ -x /usr/local/bin/perl ]; then
# perl=/usr/local/bin/perl
#break
elif [ -x /opt/csw/bin/perl ]; then
perl=/opt/csw/bin/perl
break
elif [ "$perl_attempted" = 1 ] ; then
printf "${RED}Perl could not be installed - Installation cannot continue.${NORMAL}\\n"
exit 2
fi
# couldn't find Perl, so we need to try to install it
echo 'Perl was not found on your system - Virtualmin requires it to run.'
echo 'Attempting to install it now.'
if [ -x /usr/bin/dnf ]; then
dnf -y install perl >> $log
elif [ -x /usr/bin/yum ]; then
yum -y install perl >> $log
You can see above i have even changed the perl path before re-running script
if [ -x /root/perl5/perlbrew/perls/perl-5.30.0/bin/perl ];
It was previously if [ -x /usr/bin/perl ]; by default. the path of Perl CENTOS installed one
What am i missing ? especially when the Perl environment is also set . see output of echo $PATH
]# echo $PATH
/root/perl5/perlbrew/bin:/root/perl5/perlbrew/perls/perl-5.30.0/bin:/usr/local/openssl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
[
Submitted August 23, 2019 at 09:36AM by Klassbond https://www.reddit.com/r/webhosting/comments/cugc5r/help_virtualmin_install_issue_using_perl_5300_i/?utm_source=ifttt from Blogger http://webdesignersolutions1.blogspot.com/2019/08/help-virtualmin-install-issue-using.html via IFTTT
0 notes
Link
0 notes