Perl 7 e tla ntšetsa pele nts'etsopele ea Perl 5 ntle le ho senya tšebelisano ea morao

Perl Project Governing Council e hlalositse merero ea nts'etsopele e tsoelang pele ea lekala la Perl 5 le ho theha lekala la Perl 7. Nakong ea lipuisano, Lekhotla le Busang le ile la lumellana hore ha ho amohelehe ho senya ho lumellana le khoutu e seng e ngotsoe bakeng sa Perl 5, ntle le haeba e robehile. ho lumellana hoa hlokahala ho lokisa bofokoli. Lekhotla le ile la boela la etsa qeto ea hore puo e lokela ho fetoha le likarolo tse ncha li lokela ho khothaletsoa ka matla, ha ho ntse ho etsoa hore mekhoa e mecha e be bonolo ho fihlella le ho khothaletsa ho amoheloa.

Ho fapana le maikemisetso a pele a ho lumella liphetoho tse senyang tšebelisano ea morao hore li kenyellelitsoe ka ho sa feleng lekaleng la Perl 7, morero o mocha ke ho fetola lekala la Perl 5 butle-butle ho Perl 7 ntle le ho senya tumellano ea morao le khoutu e teng. Tokollo ea Perl 7.0 e ke ke ea fapana ka maikutlo le lekala le latelang la Perl 5.xx.

Ntlafatso ea litokollo tse ncha tsa Perl 5 e tla tsoelapele joalo ka pele - likarolo tse ncha tse kenyellelitsoeng lekaleng tse sa lumellaneng le khoutu ea khale li tla kenyelletsoa feela haeba "use version" kapa "sebelisa tšobotsi" pragma e hlalositsoe ka ho hlaka. ka khoutu. Mohlala, Perl 5.010 e hlahisitse lentsoe le lecha la "re", empa kaha khoutu e teng e ka sebelisa mesebetsi e bitsoang "re", ts'ehetso ea lentsoe le lecha la sehlooho e ile ea nolofalloa feela ka ho hlakisa ka ho hlaka "ts'ebeliso ea karolo 're"" pragma.

Syntax e ncha e kenyellelitsoeng puong, eo ha e sebetsoa liphatlalatsong tse fetileng e lebisitseng phosong, e fumaneha hanghang ntle le tlhoko ea ho hlakisa li-pragmas tse khethehileng. Mohlala, Perl 5.36 e tla hlahisa syntax e nolofalitsoeng bakeng sa ho sebetsana le boleng ba lenane le lengata ka nako e le ngoe ("foreach my ($key, $value) (%hash) {") e tla fumaneha hanghang, leha e le ka khoutu ntle le "ts'ebeliso. v5.36" pragma.

Ka sebopeho sa eona sa hajoale, Perl 5.36 e sebelisa "sebelisa v5.36" pragma ho thusa likarolo tse 13 tse sa sebetseng hantle ('say', 'state', 'current_sub', 'fc', 'lexical_subs', 'signatures', 'isa ', ' bareword_filehandles', 'bitwise', 'evalbytes', 'postderef_qq', 'unicode_eval' le 'unicode_strings'), nolofalletsa mekhoa ea "sebelisa ka thata" le "sebelisa litemoso" ka mokhoa o ikhethileng 'me u tima ts'ehetso bakeng sa mongolo o sa tobang oa lefa bakeng sa ho bitsa lintho (ha sebakeng sa "- >" ho sebelisoa sebaka) le Perl 4 style multidimensional arrays le hashes ("$hash{1, 2}").

Ha liphetoho tse lekaneng li se li bokeletsoe, ho e-na le tokollo e latelang ea Perl 5.x, ho tla hlahisoa mofuta oa Perl 7.0, o tla fetoha mofuta oa setšoantšo sa boemo, empa o tla lula o le morao ka ho feletseng o lumellana le Perl 5. Ho nolofalletsa liphetoho le litlhophiso. Khokahano eo ea khefu, o tla hloka ho kenyelletsa ka ho hlaka "sebelisa v7" pragma khoutu. . Tseo. khoutu e nang le "sebelisa v7" pragma e ka nkuoa e le "Perl ea sejoale-joale", eo ho eona ho nang le liphetoho tsa puo tse lumellanang le maemo, 'me ntle le - "Conservative Perl", e tla lula e le morao ka botlalo e lumellana le litokollo tse fetileng.

Source: opennet.ru

Eketsa ka tlhaloso