X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=src%2FPerl-Style;h=b4aedcb0e2777db6b6df5d565c7e752c77ee86e1;hp=10fe1118a16e0dece668ca6cbf8f711387c7ee61;hb=271bd12bf3ce2bbf0e03fa5fe2bec93840d2c247;hpb=ff7745dd3af42c6a4e18c9dae402d32c02273d88 diff --git a/src/Perl-Style b/src/Perl-Style index 10fe111..b4aedcb 100644 --- a/src/Perl-Style +++ b/src/Perl-Style @@ -202,7 +202,7 @@ Curly-bracketing all subexpressions for dereferencign explicitely if not trivial print @$arrayref; Declaration scope of 'my' in the non-sub{} file: Whole file inside one package. -Declaration scope of 'my' in sub{}: Only this sub{}, not accessible by callees. +Declaration scope of 'my' in sub{} or block {}: Only in { }, not accessible by callees. Declaration scope of 'local': This sub{} and globally for all callees. * Perfect for some nesting counters: my $func_nest=0; @@ -213,4 +213,4 @@ Declaration scope of 'local': This sub{} and globally for all callees. } * Built-in variables cannot be 'my' scoped, use 'local' instead Declaration scope of 'our'(5.6.0+) or 'use vars...': Global across packages. -(These scoping rules are IMO simplified but works4me.) +(These scoping rules are simplified but works4me.)