From: gfx Date: Thu, 8 Oct 2009 09:54:42 +0000 (+0900) Subject: generate-mouse-tiny.pl must depend on only standard libraries X-Git-Tag: 0.37_04~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dc8e9f34ce28e77bbd1ceb05324af02f026a69c0;p=gitmo%2FMouse.git generate-mouse-tiny.pl must depend on only standard libraries --- diff --git a/author/generate-mouse-tiny.pl b/author/generate-mouse-tiny.pl index 9e4120d..8f039b6 100755 --- a/author/generate-mouse-tiny.pl +++ b/author/generate-mouse-tiny.pl @@ -2,9 +2,20 @@ use strict; use warnings; use File::Find; -use File::Slurp 'slurp'; -use List::MoreUtils 'uniq'; -use autodie; +use Fatal qw(open close); +#use File::Slurp 'slurp'; +#use List::MoreUtils 'uniq'; +#use autodie; + +sub slurp { + open my $in, '<', $_[0]; + local $/; + return scalar <$in>; +} +sub uniq{ + my %seen; + return grep{ !$seen{$_}++ } @_; +} require 'lib/Mouse/Spec.pm';