X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FStorage%2FEngine%2FIO%2FFile.pm;h=4fdb68ee35ae91287365c394b54176be0571d9e2;hb=3e13f37e59d9e944364e51af35894a1dc744bc81;hp=eb92a04b88a261129e5400f4bf7433b4a61808dd;hpb=69b45b7d79fa7628879179765a6deba184f92fdf;p=gitmo%2FMooseX-Storage.git diff --git a/lib/MooseX/Storage/Engine/IO/File.pm b/lib/MooseX/Storage/Engine/IO/File.pm index eb92a04..4fdb68e 100644 --- a/lib/MooseX/Storage/Engine/IO/File.pm +++ b/lib/MooseX/Storage/Engine/IO/File.pm @@ -2,9 +2,10 @@ package MooseX::Storage::Engine::IO::File; use Moose; +use utf8 (); use IO::File; -our $VERSION = '0.02'; +our $VERSION = '0.30'; our $AUTHORITY = 'cpan:STEVAN'; has 'file' => ( @@ -24,6 +25,7 @@ sub store { my ($self, $data) = @_; my $fh = IO::File->new($self->file, 'w') || confess "Unable to open file (" . $self->file . ") for storing : $!"; + $fh->binmode(':utf8') if utf8::is_utf8($data); print $fh $data; } @@ -75,7 +77,7 @@ Stevan Little Estevan.little@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2007 by Infinity Interactive, Inc. +Copyright 2007-2008 by Infinity Interactive, Inc. L