# Copyright (c) 2009 bivio Software Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: Spider.bunit,v 1.1 2009/10/16 08:43:53 dobbs Exp $ Request(); my $_bunit_get_fields = sub { my($o) = shift->get('object'); return [$o->_bunit_get_field('queue'), [sort(keys(%{$o->_bunit_get_field('in_queue')}))]]; }; [ sub {class()->new({ base => 'http://petshop.bivio.biz', include => [qr{/bp/}i], exclude => [qr{/x/}i], })} => [ local_uri => [ '/a/bp/c' => 'http://petshop.bivio.biz/a/bp/c', '/a/bp' => [], '/x/bp/' => [], ], ], sub {class()->new({ base => 'http://petshop.bivio.biz', cookies => '/tmp/cookies.txt', })} => [ local_uri => [ '/a/b' => 'http://petshop.bivio.biz/a/b', '/a/b?c=d' => 'http://petshop.bivio.biz/a/b', 'http://example.com/a' => [], 'mailto:a@b.com' => [], '/a/b/c.pdf' => [], ], { method => 'parse_links', compute_return => sub { return shift->get('object')->_bunit_get_field('page_links'); }, } => [ [\(<<'EOF')] a@b.com
| i |