Navigation Menu

Skip to content

Commit

Permalink
Corrected some prototypes
Browse files Browse the repository at this point in the history
  • Loading branch information
bluescreen10 committed Oct 2, 2011
1 parent 5826f35 commit 93df1f1
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions lib/Test/Mock/FileSystem.pm
Expand Up @@ -11,11 +11,11 @@ Mock::FileSystem - Simulate filesystem resources to help testing modules that de
=head1 VERSION
Version 0.01
Version 0.01_001
=cut

our $VERSION = '0.01';
our $VERSION = '0.01_001';

=head1 SYNOPSIS
Expand Down Expand Up @@ -220,13 +220,12 @@ sub _closedir {

sub _mkdir { }

sub _open {
sub _open (\[*$];@$) {
my ( $fh, $access, $name ) = @_;

#my ( $fh, $access, $name ) = @_;
$name ||= '';
my $compound = "$access $name";

my $name = $_[2] || '';
my $compound = "$_[1] $_[2]";
my $access;
if ( $compound =~ /\s*(<|>|>>|\+<|\+>|\+>>)?\s*(\S+)\s*/ ) {
$access = $1 || '<';
$name = $2;
Expand All @@ -242,12 +241,11 @@ sub _open {
return 0;
}

return CORE::open( $_[0], $access, $entry->{content} );
return CORE::open( $$fh, $access, $entry->{content} );
}

sub _opendir {
my $dh = \$_[0];
my $path = $_[1];
sub _opendir (\[*$];$) {
my ( $dh, $path ) = @_;

my $entry = _getpath($path);

Expand Down

0 comments on commit 93df1f1

Please sign in to comment.