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
| chris-andrews-computer:~ chris$ perl foo.pl | |
| defaults: | |
| foo at foo.pl line 14 | |
| main::foo('aaaaaaaaaa', 'bbbbbbbbbb') called at foo.pl line 18 | |
| main::bar('aaaaaaaaaa', 'bbbbbbbbbb') called at foo.pl line 5 | |
| both set to 1: | |
| foo at foo.pl line 14 | |
| main::foo('aaaaaaaaaa', 'bbbbbbbbbb', ...) called at foo.pl line 18 | |
| main::bar('aaaaaaaaaa', 'bbbbbbbbbb', ...) called at foo.pl line 11 |
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
| $ENV{PERL_MM_USE_DEFAULT} = '1'; | |
| # cpan2rpm causes these to be set, which makes AutoInstall not install deps. | |
| delete $ENV{PERL5_CPAN_IS_RUNNING}; | |
| delete $ENV{PERL5_CPANPLUS_IS_RUNNING}; | |
| use FindBin; | |
| my $sitelib = "$FindBin::Bin/site-lib"; | |
| use local::lib '--self-contained', "$FindBin::Bin/site-lib"; |
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
| [debug] Loaded components: | |
| .-----------------------------------------------------------------+----------. | |
| | Class | Type | | |
| +-----------------------------------------------------------------+----------+ | |
| | PaymentApp::Controller::PaymentProvider | instance | | |
| | PaymentApp::Controller::PaymentProvider::Null::Dev | instance | | |
| | PaymentApp::Controller::PaymentProvider::Null::Unittests | instance | | |
| | PaymentApp::Controller::Root | instance | | |
| | PaymentApp::Model::PaymentProvider | instance | | |
| | PaymentApp::Model::PaymentProvider::Null | class | |
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
| __PACKAGE__->config( | |
| name => 'StatsReceiver', | |
| 'Controller::Stats' => | |
| { | |
| superclasses => [qw/Catalyst::Controller::MessageDriven/], | |
| }, | |
| 'Model::Stats' => | |
| { | |
| class => 'StatsReceiver::ToCouchDB', | |
| interface_roles => [qw/StatsReceiver::StatsMessage/], |
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
| sub enterprises : PathPart('enterprises') Chained('/') ActionClass('REST') { } | |
| sub enterprises_GET { | |
| my ( $self, $c ) = @_; | |
| my @ents_rs = $c->model('ProfileDB::Enterprise')->all(); | |
| my @enterprises = map { { uri => $c->uri_for($c->controller->action_for('enterprise'), $_->id)->as_string, | |
| id => $_->id, | |
| name => $_->name } } @ents_rs; |
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
| require 'java' | |
| import javax.naming.InitialContext | |
| import javax.naming.directory.SearchControls | |
| import javax.naming.AuthenticationException | |
| import javax.naming.CommunicationException | |
| module Ldap | |
| module JndiLdap | |
| # make the SUBTREE_SCOPE constant available | |
| SearchControls.field_reader(:SUBTREE_SCOPE) |
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 ruby | |
| require 'rubygems' | |
| require 'grit' | |
| commits = ARGV | |
| r = Grit::Repo.new('.') | |
| commits.each do |commit| | |
| c = r.commits(commit).first | |
| puts "#> #{c.message}" |
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 | |
| package Probe; | |
| use Scalar::Util qw/ set_prototype /; | |
| sub create_function { | |
| my ($answer) = @_; | |
| *Probe::block = sub (&) { | |
| shift->($answer); | |
| }; |
NewerOlder