aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2016-09-18 01:41:03 -0400
committerTeddy Wing2016-09-18 01:41:03 -0400
commit4ad5a016b377cabd1d667c8ec9623598e1f422f8 (patch)
tree51afd47704ae4d3d51f5be567daea5b02f703fb3
parent38538ebdd9789aea0467a1f05e0213eda40a17df (diff)
downloadirssi-slack-profile-4ad5a016b377cabd1d667c8ec9623598e1f422f8.tar.bz2
Replace smartmatch operator
Change the smartmatch operator to `grep` instead because after Perl 5.18 it causes this warning: Smartmatch is experimental at slack_profile.pl line 306. Using advice from: http://www.perlmonks.org/?node_id=1067462
-rw-r--r--slack_profile.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/slack_profile.pl b/slack_profile.pl
index 523d548..1c6f1a7 100644
--- a/slack_profile.pl
+++ b/slack_profile.pl
@@ -303,7 +303,7 @@ sub update_user_profile {
# If $key is a custom field, find the custom field's id and use
# that as the key instead.
- unless ($key ~~ @profile_fields) {
+ unless (grep { $_ eq $key } @profile_fields) {
# Find key in custom field labels
for my $custom_field (keys %{$user->{'fields'}}) {
if (underscorize($user->{'fields'}->{$custom_field}->{'label'})