This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| my $aa = { | |
| aa => hoge(), | |
| bb => 'xxx', | |
| }; | |
| sub hoge { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| script_line1 = use strict | |
| script_line2 = use warnings | |
| script_line3 = use 5.018002 | |
| script_line4 = use Otogiri; | |
| script_line5 = use Otogiri::Plugin; | |
| script_line6 = my $connect_info = ["dbi:...",'username','password', { AutoCommit => 1, RaiseError => 1,PrintError => 0, pg_enable_utf8 => 1,}]; | |
| script_line7 = Otogiri->load_plugin('DeleteCascade'); | |
| script_line8 = my $db = Otogiri->new( connect_info => $connect_info ); | |
| [Interrupt] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| sub hoge { | |
| die "hoge"; | |
| } | |
| eval { | |
| hoge({ return'hogehoge' }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| sub hoge { | |
| die "hoge"; | |
| } | |
| hoge({ return'hogehoge' }); | |
| # tsucchi@dev[1017]$ perl test.pl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| uuse strict; | |
| use warnings; | |
| my @table_ddls; | |
| my %table_ddl_exists; | |
| sub sql { | |
| my ($sql) = @_; | |
| return Search_by_sql($sql); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # plenvを自動的に入れてくれるやつです | |
| set -e | |
| if [[ $(which plenv 2> /dev/null) ]]; then | |
| echo 'plenv already installed.' | |
| elif [[ ! $(which git) ]]; then | |
| echo 'git is not installed!!!!!!!' | |
| exit 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MY_PERLBREW_PERL="perl-5.20@default" | |
| alias reply-service1="perlbrew exec -q --with $MY_PERLBREW_PERL env PERL_REPLY_PLUGIN_ORM=service1 reply --cfg $HOME/etc/.replyrc_otogiri" | |
| alias reply-service2="perlbrew exec -q --with $MY_PERLBREW_PERL env PERL_REPLY_PLUGIN_ORM=service2 reply --cfg $HOME/etc/.replyrc_otogiri" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use Data::Dumper; | |
| use constant hoge => 123; | |
| my $fuga = { | |
| hoge => 456, | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use Data::Dumper; | |
| # https://github.com/perl-entrance-org/workshop-2014-03/blob/master/slide.md | |
| # ラストの練習問題の回答例 | |
| my $papix = { | |
| name => 'papix', | |
| affiliation => 'namba.pm', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!perl | |
| use strict; | |
| use warnings; | |
| use Otogiri; | |
| use Otogiri::Plugin; | |
| use File::Path qw(remove_tree make_path); | |
| use File::Spec; | |
| use File::Slurp qw(write_file); | |
| my $config = do "/home/tsucchi/.otogiri_connect_info.pl"; |
OlderNewer