From 8f9f4bed68f044134df726350234d4adfa7bf8cc Mon Sep 17 00:00:00 2001 From: trizen Date: Sat, 1 Aug 2015 13:05:38 +0300 Subject: [PATCH] - Added the 'Perl' class into the parser list of 'built_in_classes' --- lib/Sidef/Parser.pm | 10 +++++++--- scripts/amb_nested_loops.sf | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/Sidef/Parser.pm b/lib/Sidef/Parser.pm index 0fb8043c1..519600d97 100644 --- a/lib/Sidef/Parser.pm +++ b/lib/Sidef/Parser.pm @@ -145,9 +145,12 @@ package Sidef::Parser { built_in_classes => { map { $_ => 1 } qw( - File FileHandle - Dir DirHandle - Arr Array Pair + File + FileHandle + Dir + DirHandle + Arr Array + Pair MultiArray MultiArr Hash Str String @@ -165,6 +168,7 @@ package Sidef::Parser { Sig SIG Regex Time + Perl Sidef Parser Block diff --git a/scripts/amb_nested_loops.sf b/scripts/amb_nested_loops.sf index b60009947..5352b2dbe 100644 --- a/scripts/amb_nested_loops.sf +++ b/scripts/amb_nested_loops.sf @@ -15,7 +15,7 @@ var code = { |*arr| func main () { var alg = ( - try { require 'Algorithm::Loops'->() } + try { frequire 'Algorithm::Loops' } catch { STDERR.print("** Algorithm::Loops is not installed!\n"); return } );