You are not logged in.
Pages: 1
Hello friends.
Irssi trigger.pl get error.
09:30 :: Irssi: Error in script trigger:
09:30 Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at /home/username/.irssi/scripts/autorun/trigger.pl line 718.
line 718
718 if (defined %{ 'Irssi::Script::people::' }) {
719 if (defined ($channel)) {
720 $flags = (&{ 'Irssi::Script::people::find_local_flags' }($chatnet,$channel,$nick,$address));
721 } else {
722 $flags = (&{ 'Irssi::Script::people::find_global_flags' }($chatnet,$nick,$address));
723 }
trigger.pl
http://ix.io/l1t
I have to figure out how this issue.
find-broken-perl-packages.sh no problem.
$ ./find-broken-perl-packages.sh
error: no targets specified (use -h for help)
results are in "/tmp/find-broken-perl-package.kxnRmIgQ"
- {local-,}raw.txt is a list of files that caused errors
- pacman.txt is a list of packages that need to be rebuilt. Those are likely AUR packages
- local-perl-dists.txt is a list of cpan distributions installed to site_perl. Use cpan to rebuild them
additional files:
- {local-,}perl-modules.txt is a list of cpan modules that caused errors
- perl-dists.txt is a list of cpan distributions that caused errors
~
$ cat /tmp/find-broken-perl-package.kxnRmIgQ/local-perl-dists.txt
~
$ cat /tmp/find-broken-perl-package.kxnRmIgQ/local-perl-modules.txt
~
$ cat /tmp/find-broken-perl-package.kxnRmIgQ/local-raw.txt
~
$ cat /tmp/find-broken-perl-package.kxnRmIgQ/pacman.txt
~
$ cat /tmp/find-broken-perl-package.kxnRmIgQ/perl-dists.txt
~
$ cat /tmp/find-broken-perl-package.kxnRmIgQ/perl-modules.txt
~
$ cat /tmp/find-broken-perl-package.kxnRmIgQ/raw.txt
Last edited by h454n34 (2015-09-28 09:58:17)
Offline
What is Problem?
Offline
Like the error says, defined(%hash) is no longer allowed in Perl 5.22. This and defined(@array) have been deprecated since Perl 5.6.1 and raised deprecation warnings since Perl 5.16.
The fix is to remove any defined() calls from around hashes and arrays:
--- trigger.pl.orig 2015-09-28 07:42:48.811218892 +0300
+++ trigger.pl 2015-09-28 07:42:59.358018576 +0300
@@ -715,7 +715,7 @@ sub get_flags {
my ($chatnet, $channel, $nick, $address) = @_;
my $flags;
no strict 'refs';
- if (defined %{ 'Irssi::Script::people::' }) {
+ if (%{ 'Irssi::Script::people::' }) {
if (defined ($channel)) {
$flags = (&{ 'Irssi::Script::people::find_local_flags' }($chatnet,$channel,$nick,$address));
} else {
@@ -724,7 +724,7 @@ sub get_flags {
$flags = join('',keys(%{$flags}));
} else {
my $shasta;
- if (defined %{ 'Irssi::Script::friends_shasta::' }) {
+ if (%{ 'Irssi::Script::friends_shasta::' }) {
$shasta = 'friends_shasta';
} elsif (defined &{ 'Irssi::Script::friends::get_idx' }) {
$shasta = 'friends';Offline
Hey man.
you are number 1 ![]()
Thanks.
Offline
Pages: 1