Skip to content

Instantly share code, notes, and snippets.

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
$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";
[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 |
__PACKAGE__->config(
name => 'StatsReceiver',
'Controller::Stats' =>
{
superclasses => [qw/Catalyst::Controller::MessageDriven/],
},
'Model::Stats' =>
{
class => 'StatsReceiver::ToCouchDB',
interface_roles => [qw/StatsReceiver::StatsMessage/],
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;
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)
#!/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}"
#!/usr/bin/env perl
package Probe;
use Scalar::Util qw/ set_prototype /;
sub create_function {
my ($answer) = @_;
*Probe::block = sub (&) {
shift->($answer);
};