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 strict; | |
use warnings; | |
use WWW::Mechanize; | |
use HTML::TreeBuilder; | |
my $agent = WWW::Mechanize->new(); | |
$agent->get("http://www.gumtree.com/london/79/52349379.html"); |
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 Mojolicious::Plugin::Pipeline::CSSCompressor; | |
use Mojo::Base 'Mojolicious::Plugin'; | |
use CSS::Compressor 'css_compress'; | |
sub register { | |
my ($self, $app) = @_; | |
# Register "css_compressor" filter | |
$app->filter(css_compressor => sub { css_compress shift }); |