From 16d355e0817c62217826351ecdecefa4ff5596db Mon Sep 17 00:00:00 2001 From: Alexandre Morignot <erdnaxeli@cervoi.se> Date: Sun, 29 Nov 2015 20:04:35 +0100 Subject: [PATCH] fix $matching_url --- PlayBot/sites.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PlayBot/sites.pm b/PlayBot/sites.pm index db338a7..df355bc 100644 --- a/PlayBot/sites.pm +++ b/PlayBot/sites.pm @@ -25,19 +25,20 @@ sub parse { my $id; my $dbh = PlayBot::utils::db::main_session(); + my $matching_url; + my @matching_tags; + # parsing foreach my $site (__PACKAGE__->sites) { if (my @args = ($msg =~ $site->regex)) { eval { %content = $site->get(@args) }; + $matching_url = $&; last; } } - my $matching_url = $&; - my @matching_tags; - # something goes wrong ? if ($@) { $log->warning ($@); -- GitLab