This file contains 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
YUI().use("node", function(Y) { | |
/* | |
The dynamic_forms variable is setup in the page during construction as follows: | |
<script type="text/javascript"> | |
if ( typeof dynamic_forms === 'undefined' ) | |
dynamic_forms = {}; | |
dynamic_forms['timezone'] = { source: 'timezones', events: 'country' }; |
This file contains 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
diff --git a/lib/Catalyst/Engine/CGI.pm b/lib/Catalyst/Engine/CGI.pm | |
index 48dc201..ef8aa2a 100644 | |
--- a/lib/Catalyst/Engine/CGI.pm | |
+++ b/lib/Catalyst/Engine/CGI.pm | |
@@ -67,6 +67,9 @@ sub prepare_connection { | |
# as 127.0.0.1. Select the most recent upstream IP (last in the list) | |
my ($ip) = $ENV{HTTP_X_FORWARDED_FOR} =~ /([^,\s]+)$/; | |
$request->address($ip); | |
+ if ( defined $ENV{HTTP_X_FORWARDED_PORT} ) { | |
+ $ENV{SERVER_PORT} = $ENV{HTTP_X_FORWARDED_PORT}; |
This file contains 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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<title>yuiloader test</title> | |
<script type="text/javascript" src="../../../build/yuiloader-dom-event/yuiloader-dom-event.js"></script> | |
<script type="text/javascript"> | |
(function() { |
This file contains 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 Data::Verifier; | |
use DateTimeX::Easy; | |
use MooseX::Types::DateTime qw(TimeZone DateTime); | |
use MooseX::Types::Moose qw/Str/; | |
use MooseX::Types; | |
use feature ':5.10'; | |
coerce DateTime => from Str, | |
via { DateTimeX::Easy->parse_date($_); }; |
This file contains 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::SchemaRole::Verifier; | |
use Moose::Role; | |
use Try::Tiny; | |
sub validate_and_create { | |
my ( $self, $data ) = @_; | |
try { | |
my $name = $self->result_source->source_name; | |
$name =~ s/^MyApp::Schema\d?:://; |
This file contains 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 MooseX::Role::Environment; | |
use Moose::Role; | |
use MooseX::Types::Path::Class qw/File Dir/; | |
use FindBin; | |
use Data::Visitor::Callback; | |
use Scalar::Util qw(blessed); | |
use Hash::Merge; | |
use Carp; |
This file contains 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 register { | |
my ( $self, $data ) = @_; | |
my $rels = {}; | |
foreach my $key ( keys %$data ) { | |
if ( $self->result_source->has_relationship($key) ) { | |
$rels->{$key} = delete $data->{$key}; | |
} elsif ( not $self->result_source->has_column($key) ) { | |
# Delete things we don't have |
This file contains 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 warnings; | |
use strict; | |
use Path::Class; | |
# I put all of my code in a couple directories, based on project or "group" | |
# which makes me have a big long list of aliases and I have to sync it. | |
# |
This file contains 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 Greenspan::Test::WWW::Mechanize::Catalyst; | |
use Moose; | |
extends 'Test::WWW::Mechanize::Catalyst'; | |
has 'context' => ( | |
is => 'rw', | |
isa => 'Object' | |
); |
This file contains 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 MooseX::Role::Environment; | |
use Moose::Role; | |
use MooseX::Types::Path::Class qw/File Dir/; | |
use YAML::XS; | |
use FindBin; | |
use Data::Visitor::Callback; | |
use Scalar::Util qw(blessed); | |
use Hash::Merge; |