X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FStorage%2FEngine%2FIO%2FFile.pm;h=a16222f4c7e49cad38c966ce8f431ba88a4ecb65;hb=efd4f7a5691295a10f74399e63731adb9a209057;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..a16222f 100644 --- a/lib/MooseX/Storage/Engine/IO/File.pm +++ b/lib/MooseX/Storage/Engine/IO/File.pm @@ -1,10 +1,10 @@ - package MooseX::Storage::Engine::IO::File; use Moose; +use utf8 (); use IO::File; -our $VERSION = '0.02'; +our $VERSION = '0.35'; our $AUTHORITY = 'cpan:STEVAN'; has 'file' => ( @@ -24,6 +24,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 +76,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