|
ru.cgi.perl- RU.CGI.PERL ------------------------------------------------------------------ From : Comoderator of RU.CGI.PERL 2:5020/371.32 15 Feb 2001 14:31:38 To : Ruslan Bondarev Subject : Moderatorial [*] (Re: ?) -------------------------------------------------------------------------------- В твоём письме от Thu, 15 Feb 2001 01:22:17 +0300 написано: RB> Привет Владимиp. RB> Вторник Февраль 13 2001 20:15, Владимиp Гpебнев -> Artem Chuprina: >> Аpтем, ну как ты не поймешь, _HЕТУ У МЕHЯ perldoc'a_, потму и >> спpашиваю...Да и эха вpоде для этого...... RB> Есть у тебя перлдок, тебе просто задницей пошевелить лень. RB> Дарю, не шевели дальше: (о: RB> goto LABEL RB> goto EXPR RB> goto &NAME RB> goto LABEL finds the statement labeled with LABEL and resumes execution RB> there. It may not be used to go into any construct that requires RB> initialization, such as a subroutine or a foreach loop. It also can't be RB> used to go into a construct that is optimized away. It can be used to go RB> almost anywhere else within the dynamic scope,[4] including out RB> of subroutines, but for that purpose it's usually better to use some other RB> construct such as last or die. The author of Perl has never felt the need to RB> use this form of goto (in Perl, that is - C is another matter). RB> [4] This means that if it doesn't find the label in the current routine, it RB> looks back through the routines that called the current routine for the RB> label, thus making it nearly impossible to maintain your program. RB> Going to even greater heights of orthogonality (and depths of idiocy), Perl RB> allows goto EXPR, which expects EXPR to evaluate to a label name, whose RB> scope is guaranteed to be unresolvable until run-time since the label is RB> unknown when the statement is compiled. This allows for computed gotos per RB> FORTRAN, but isn't necessarily recommended[5] if you're optimizing for RB> maintainability: RB> [5] Understatement is reputed to be funny, so we thought we'd try one here. RB> goto +("FOO", "BAR", "GLARCH")[$i]; RB> goto &NAME is highly magical, substituting a call to the named subroutine RB> for the currently running subroutine. This is used by AUTOLOAD subroutines RB> that wish to load another subroutine and then pretend that this subroutine - RB> and not the original one - had been called in the first place (except that RB> any modifications to @_ in the original subroutine are propagated to the RB> replacement subroutine). After the goto, not even caller will be able to RB> tell that the original routine was called first. RB> (Стайлуса только у меня не проси - не дам точно) RB> ... bye. Оффтопик. -- FIDO: Artem Chuprina, 2:5020/371.32, comoderator of RU.CGI.PERL Internet: Artem Chuprina <cmrcp@ran.pp.ru>, comoderator of fido7.ru.cgi.perl --- slrn/0.9.6.3-as (Linux) * Origin: AKA с подствольным плюсомётом (2:5020/371.32) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.cgi.perl/72526a92f9d91.html, оценка из 5, голосов 10
|