Skip to content

Commit

Permalink
cosmetic changes (#2)
Browse files Browse the repository at this point in the history
* remove xt

* use warnings

* no autodie

* use XSLoader

* use Exporter

* remove broken link

* set Rob Hoelz as an author

* add t/00report.t
  • Loading branch information
skaji committed Jul 13, 2023
1 parent 24c391a commit 7dfa571
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 54 deletions.
6 changes: 2 additions & 4 deletions META.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"abstract" : "Monitor a directory structure for changes",
"author" : [
"Andy Grundman, <andy@hybridized.org>"
"Andy Grundman <andy@hybridized.org>, Rob Hoelz <rob@hoelz.ro>"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010",
Expand All @@ -26,8 +26,7 @@
},
"test" : {
"requires" : {
"Test::More" : "0.99",
"autodie" : "0"
"Test::More" : "0.99"
}
}
},
Expand Down Expand Up @@ -56,7 +55,6 @@
"x_contributors" : [
"Doug Bell <madcityzen@gmail.com>",
"Fayland Lam <fayland@gmail.com>",
"Rob Hoelz <rob@hoelz.ro>",
"Shoichi Kaji <skaji@cpan.org>"
],
"x_generated_by_perl" : "v5.38.0",
Expand Down
8 changes: 3 additions & 5 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ my %args = (

my %WriteMakefileArgs = (
"ABSTRACT" => "Monitor a directory structure for changes",
"AUTHOR" => "Andy Grundman, <andy\@hybridized.org>",
"AUTHOR" => "Andy Grundman <andy\@hybridized.org>, Rob Hoelz <rob\@hoelz.ro>",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
Expand All @@ -65,8 +65,7 @@ my %WriteMakefileArgs = (
"NAME" => "Mac::FSEvents",
"PREREQ_PM" => {},
"TEST_REQUIRES" => {
"Test::More" => "0.99",
"autodie" => 0
"Test::More" => "0.99"
},
"VERSION" => "0.20",
"test" => {
Expand All @@ -80,8 +79,7 @@ my %WriteMakefileArgs = (
);

my %FallbackPrereqs = (
"Test::More" => "0.99",
"autodie" => 0
"Test::More" => "0.99"
);

unless ( eval { ExtUtils::MakeMaker->VERSION('6.63_03') } ) {
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,12 @@ Event monitoring occurs in a separate C thread from the rest of your application

Stop watching.

# SEE ALSO

http://developer.apple.com/documentation/Darwin/Conceptual/FSEvents\_ProgGuide

# AUTHOR

Andy Grundman, <andy@hybridized.org>

Rob Hoelz, <rob@hoelz.ro>

# COPYRIGHT AND LICENSE

Copyright (C) 2009 by Andy Grundman
Expand Down
1 change: 0 additions & 1 deletion cpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ prereqs:
test:
requires:
Test::More: { version: '0.99' }
autodie:
1 change: 1 addition & 0 deletions dist.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name = Mac-FSEvents
author = Andy Grundman <andy@hybridized.org>, Rob Hoelz <rob@hoelz.ro>

[Git::GatherDir]
exclude_filename = META.json
Expand Down
13 changes: 6 additions & 7 deletions lib/Mac/FSEvents.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package Mac::FSEvents;

use 5.008008;
use strict;
use base 'Exporter';
use warnings;
use Exporter 'import';

use Mac::FSEvents::Event;

Expand All @@ -13,8 +14,8 @@ our %EXPORT_TAGS = ( flags => \@EXPORT_OK );

my @maybe_export_ok = qw(IGNORE_SELF FILE_EVENTS);

require XSLoader;
XSLoader::load('Mac::FSEvents', $VERSION);
use XSLoader;
XSLoader::load(__PACKAGE__, $VERSION);

my %const_args;

Expand Down Expand Up @@ -249,14 +250,12 @@ Stop watching.
=back
=head1 SEE ALSO
http://developer.apple.com/documentation/Darwin/Conceptual/FSEvents_ProgGuide
=head1 AUTHOR
Andy Grundman, E<lt>andy@hybridized.orgE<gt>
Rob Hoelz, <rob@hoelz.ro>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2009 by Andy Grundman
Expand Down
1 change: 1 addition & 0 deletions lib/Mac/FSEvents/Event.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package Mac::FSEvents::Event;

use strict;
use warnings;

sub id { shift->{id} }
sub flags { shift->{flags} }
Expand Down
12 changes: 12 additions & 0 deletions t/00report.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
use strict;
use warnings;
use Test::More;
use POSIX ();

diag "";
diag `sw_vers`;
diag "Machine:\t", (POSIX::uname)[4];

pass "ok";

done_testing;
2 changes: 2 additions & 0 deletions t/01use.t
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use strict;
use warnings;
use Test::More;

use_ok 'Mac::FSEvents';
Expand Down
3 changes: 1 addition & 2 deletions t/02constructor.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/perl

use strict;
use warnings;

use Mac::FSEvents;

Expand Down
3 changes: 1 addition & 2 deletions t/03event.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/perl

use strict;
use warnings;

use Cwd qw( abs_path );
use File::Temp;
Expand Down
1 change: 0 additions & 1 deletion t/04flags.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use strict;
use warnings;
use autodie;

use Cwd qw( getcwd abs_path );
use File::Path qw( make_path );
Expand Down
3 changes: 2 additions & 1 deletion t/05fork.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use strict;
use warnings;
use autodie;

use IO::Select;
use File::Temp;
Expand All @@ -22,6 +21,7 @@ sub subprocess (&) {
my ( $action ) = @_;

my $pid = fork;
die "failed to fork: $!" if !defined $pid;

if($pid) {
waitpid $pid, 0;
Expand All @@ -48,6 +48,7 @@ subtest 'subprocess events' => sub {

# our subprocess will call DESTROY on the Mac::FSEvents object!
my $pid = fork;
die "failed to fork: $!" if !defined $pid;
unless($pid) {
exit 0;
}
Expand Down
5 changes: 0 additions & 5 deletions xt/02pod.t

This file was deleted.

5 changes: 0 additions & 5 deletions xt/03podcoverage.t

This file was deleted.

5 changes: 0 additions & 5 deletions xt/04critic.rc

This file was deleted.

12 changes: 0 additions & 12 deletions xt/04critic.t

This file was deleted.

0 comments on commit 7dfa571

Please sign in to comment.