Skip to content

Instantly share code, notes, and snippets.

@Akron
Created May 14, 2012 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Akron/2698091 to your computer and use it in GitHub Desktop.
Save Akron/2698091 to your computer and use it in GitHub Desktop.
Mojo::URL-Behaviour
#!/usr/bin/env perl
use Mojo::URL;
my $url = Mojo::URL->new('http://example.com/?action=test');
my $url2 = Mojo::URL->new('broker.js?foo=bar');
$url->path($url2->path);
$url->query($url2->query);
# http://example.combroker.js?foo=bar
# ^ ???
print $url;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment