Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Race condition in Dancer

by choroba (Bishop)
on Nov 08, 2012 at 09:18 UTC ( #1002848=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    [14166] error @0.102147> [hit #336]request to GET / crashed: YAML Erro
    +r: Invalid element in map
       Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT
       Line: 315
       Document: 1
     at /opt/perl5.14/lib/site_perl/5.14.2/YAML/Loader.pm line 352. in /op
    +t/perl5.14/lib/site_perl/5.14.2/Dancer/Handler.pm l. 98
    
  2. or download this
    ...
          question:
            - "You can select more than one answer.\n"
    e answer.\n"
    
  3. or download this
    sub flush {
        my $self         = shift;
    ...
    
        return $self;
    }
    
  4. or download this
    #!/usr/bin/perl
    use warnings;
    ...
        close   $child                    or die "close child: $!";
    }
    
  5. or download this
    open my $fh, '+<', $file or die "Can't open '$file': $!\n";
    flock $fh, LOCK_EX or die "Can't lock file '$file': $!\n";
    truncate $fh, 0;
    print {$fh} $content;
    close $fh or die "Can't close '$file': $!\n";
    
  6. or download this
    sub atomic_write {
        my ($path, $file, $data) = @_;
    ...
        close $fh or die "Can't close '$file': $!\n";
        rename($filename, $file) or die "Can't move '$filename' to '$file'
    +";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://1002848]
Approved by zwon
Front-paged by zwon
help
Chatterbox?
[holli]: what's that smell?
[LanX]: good evening! :)
[Discipulus]: ProvoLanX? grin..
[holli]: wow. the google translation to german is really good

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2017-11-20 19:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (292 votes). Check out past polls.

    Notices?