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 @test; | |
sub test { | |
my ($class, $arg) = @_; | |
my $varname = "${class}::test"; | |
no strict "refs"; | |
push @$varname, $arg if defined($arg); | |
return @$varname, | |
map { $_->test } |
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 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); |
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
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 |
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
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! |
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 View::User; | |
use Template::Perl; | |
use Moo; | |
has 'model' => (is=>'ro', required=>1); | |
sub template { | |
my ($class, $builder) = @_; |
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 Liminal::Schema::Result::Person; | |
use strict; | |
use warnings; | |
use base 'Liminal::Schema::Result'; | |
__PACKAGE__->table("person"); | |
__PACKAGE__->load_components(qw/EncodedColumn /); |
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 $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, | |
}, |
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 MyApp; | |
use Moose; | |
use Catalyst; | |
has my_special_flag => (is=>'ro', required=>1); | |
sub load_env { | |
my ($target) = @_; | |
return $ENV{"ADAMA_${target}"} || |
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 $artist = Artist->new_result({ | |
name => "John", | |
artist_cd_rs => [ | |
{cd => {title=>"one"}}, | |
{cd => {title=>"two"}}, | |
], | |
}); | |
ok $artist->custom_method_on_resultsourc; |
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 Test::Most; | |
use Devel::Dwarn; | |
{ | |
package Valiant::Scalar; | |
use Moo::Role; | |
our $rules_initialized = 0; | |
our @rules =(); |