Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Creating Nested Functions

by ikegami (Pope)
on Jul 10, 2008 at 01:42 UTC ( #696592=perltutorial: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    
       inner();
    }
    
  2. or download this
    >perl -c test.pl
    Variable "$foo" will not stay shared at test.pl line 8.
    test.pl syntax OK
    
  3. or download this
    use strict;
    use warnings;
    ...
    
       $inner->();
    }
    
  4. or download this
    >perl -c test.pl
    test.pl syntax OK
    
  5. or download this
    use strict;
    use warnings;
    ...
          $inner->()
       }
    }
    
  6. or download this
    Global symbol "$inner" requires explicit package name at test.pl line 
    +6.
    test.pl had compilation errors.
    
  7. or download this
    use strict;
    use warnings;
    ...
          $inner->()
       }
    }
    
  8. or download this
    >perl -c test.pl
    test.pl syntax OK
    
  9. or download this
    # ReleaseTracker.pm
    
    ...
    sub o { ReleaseTracker->new(); }
    
    1;
    
  10. or download this
    use strict;
    use warnings;
    ...
    outer( o() );
    
    END { print("On program exit:\n"); }
    
  11. or download this
    >perl test.pl
    On program exit:
    Destroyed           <--- BAD!
    
  12. or download this
    use strict;
    use warnings;
    ...
    outer( o() );
    
    END { print("On program exit:\n"); }
    
  13. or download this
    >perl test.pl
    Destroyed
    On program exit:
                        <-- good
    
  14. or download this
    sub outer {
       ...
    ...
       };
       helper(@_);
    }
    
  15. or download this
    sub outer {
       ...
    ...
          }
       } )->(@_);
    }
    
  16. or download this
    sub outer {
       ...
    ...
       weaken($helper);
       $helper->(@_);
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perltutorial [id://696592]
help
Chatterbox?
[Corion]: If you cram your slides with that much information, they might work in an "offline" situation but not very well for a live presentation IMO
[ambrus]: Corion: in that case I also ask the people who rent the conference rooms to tell conference organizers about the available tech.
[Corion]: ambrus: No, you're misunderstanding. If you place content too far on the left/right/top/ bottom, people might not see it because the view is obstructed ;)(
[Corion]: In Amsterdam, the screen went down to the bottom of the stage (60cm above ground) and the seating was on the ground, meaning that the rows in the back couldn't see the bottom of slides.
[Corion]: There also were some columns that meant that maybe you couldn't see the left/right edge of a slide.
[ambrus]: Corion: Sure. I've had a course in a 50 seat lecture hall that has two fucking columns in the middle.
[Corion]: Talking about it, the top should be fairly visible in the situations I've experienced at least. The top is uncomfortable for people in the first three rows, but that's life ;)
[ambrus]: The pillars are there because this is in the 6th floor of building R of BME, which is an attic that was built in after the original building, which is also why the elevator doesn't go that high and the windows are tiny.
[Corion]: ambrus: Hehe ;) Yeah - such real life stuff is far more inconveniencing than wasting display area due to screen ratio problems :)
[ambrus]: Corion: yes, it's a bit tricky. you can try to adjust the slides live to cover only a part of the screen, but it's still hard.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (12)
As of 2017-09-26 10:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (293 votes). Check out past polls.

    Notices?