Skip to content

Instantly share code, notes, and snippets.

View jjn1056's full-sized avatar

John Napiorkowski jjn1056

View GitHub Profile
my @test;
sub test {
my ($class, $arg) = @_;
my $varname = "${class}::test";
no strict "refs";
push @$varname, $arg if defined($arg);
return @$varname,
map { $_->test }
package MooX::TrackRoles;
use Role::Tiny ();
sub import {
my $class = shift;
my $target = caller;
die "'$target' is not a Role" unless Role::Tiny->is_role($target);
INFO global: Vagrant version: 2.2.7
INFO global: Ruby version: 2.4.9
INFO global: RubyGems version: 2.6.14.4
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/bin/vagrant"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
WARN global: resolv replacement has not been enabled!
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/plugins/synced_folders/nfs/plugin.rb
@jjn1056
jjn1056 / log.txt
Created March 5, 2020 16:46
VAGRANT_LOG=debug vagrant halt
mm-mac-7425:CatmeOps-V3 jnapiorkowski$ VAGRANT_LOG=debug vagrant halt
INFO global: Vagrant version: 2.2.7
INFO global: Ruby version: 2.4.9
INFO global: RubyGems version: 2.6.14.4
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
WARN global: resolv replacement has not been enabled!
package View::User;
use Template::Perl;
use Moo;
has 'model' => (is=>'ro', required=>1);
sub template {
my ($class, $builder) = @_;
package Liminal::Schema::Result::Person;
use strict;
use warnings;
use base 'Liminal::Schema::Result';
__PACKAGE__->table("person");
__PACKAGE__->load_components(qw/EncodedColumn /);
my $schema = shift; # ISA DBIx::Class::Schema
use SQL::Translator;
use SQL::Translator::Diff;
my $target_schema = SQL::Translator->new(
parser => 'SQL::Translator::Parser::DBIx::Class',
parser_args => {
dbic_schema => $schema,
},
@jjn1056
jjn1056 / MyApp.pm
Last active January 10, 2020 21:11
package MyApp;
use Moose;
use Catalyst;
has my_special_flag => (is=>'ro', required=>1);
sub load_env {
my ($target) = @_;
return $ENV{"ADAMA_${target}"} ||
my $artist = Artist->new_result({
name => "John",
artist_cd_rs => [
{cd => {title=>"one"}},
{cd => {title=>"two"}},
],
});
ok $artist->custom_method_on_resultsourc;
use Test::Most;
use Devel::Dwarn;
{
package Valiant::Scalar;
use Moo::Role;
our $rules_initialized = 0;
our @rules =();