File-ChangeNotify-0.28/0000775000175000017500000000000013240163307014537 5ustar autarchautarchFile-ChangeNotify-0.28/dist.ini0000644000175000017500000000202313240163307016176 0ustar autarchautarchname = File-ChangeNotify author = Dave Rolsky license = Artistic_2_0 copyright_holder = Dave Rolsky copyright_year = 2009 [@DROLSKY] dist = File-ChangeNotify next_release_width = 6 pod_coverage_class = Pod::Coverage::Moose pod_coverage_skip = File::ChangeNotify::Watcher::Default pod_coverage_skip = File::ChangeNotify::Watcher::Inotify pod_coverage_skip = File::ChangeNotify::Watcher::KQueue pod_coverage_trustme = File::ChangeNotify::Watcher => qr/^BUILD/ prereqs_skip = IO::KQueue prereqs_skip = Linux::Inotify2 stopwords = distro stopwords = userspace stopwords = FreeBSD stopwords = Linux's stopwords = OpenBSD -remove = Test::Compile -remove = Test::Pod::LinkCheck -remove = Test::Synopsis [OptionalFeature / Inotify] -description = Inotify support for faster notification on Linux -relationship = recommends -require_develop = 0 Linux::Inotify2 = 1.2 [OptionalFeature / KQueue] -description = KQueue support for faster notification on BSD & OSX -relationship = recommends -require_develop = 0 IO::KQueue = 0 File-ChangeNotify-0.28/META.yml0000644000175000017500000005557213240163307016024 0ustar autarchautarch--- abstract: 'Watch for changes to files, cross-platform style' author: - 'Dave Rolsky ' build_requires: Data::Dumper: '0' Exporter: '0' ExtUtils::MakeMaker: '0' File::Path: '0' File::Spec: '0' File::Temp: '0' FindBin: '0' Test::Exception: '0' Test::More: '0.96' Test::Requires: '0' Test::Without::Module: '0' base: '0' lib: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.011, CPAN::Meta::Converter version 2.150010' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: File-ChangeNotify optional_features: Inotify: description: 'Inotify support for faster notification on Linux' recommends: Linux::Inotify2: '1.2' KQueue: description: 'KQueue support for faster notification on BSD & OSX' recommends: IO::KQueue: '0' provides: File::ChangeNotify: file: lib/File/ChangeNotify.pm version: '0.28' File::ChangeNotify::Event: file: lib/File/ChangeNotify/Event.pm version: '0.28' File::ChangeNotify::Watcher: file: lib/File/ChangeNotify/Watcher.pm version: '0.28' File::ChangeNotify::Watcher::Default: file: lib/File/ChangeNotify/Watcher/Default.pm version: '0.28' File::ChangeNotify::Watcher::Inotify: file: lib/File/ChangeNotify/Watcher/Inotify.pm version: '0.28' File::ChangeNotify::Watcher::KQueue: file: lib/File/ChangeNotify/Watcher/KQueue.pm version: '0.28' requires: Carp: '0' Class::Load: '0' File::Find: '0' File::Spec: '0' Module::Pluggable::Object: '0' Module::Runtime: '0' Moo: '1.006' Moo::Role: '0' Time::HiRes: '0' Type::Utils: '0' Types::Standard: '0' namespace::autoclean: '0' strict: '0' warnings: '0' resources: bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=File-ChangeNotify homepage: http://metacpan.org/release/File-ChangeNotify repository: git://github.com/houseabsolute/File-ChangeNotify.git version: '0.28' x_Dist_Zilla: perl: version: '5.026001' plugins: - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@DROLSKY/MakeMaker' version: '6.011' - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - CONTRIBUTING.md - LICENSE - Makefile.PL - README.md - cpanfile exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: '@DROLSKY/Git::GatherDir' version: '2.043' - class: Dist::Zilla::Plugin::ManifestSkip name: '@DROLSKY/ManifestSkip' version: '6.011' - class: Dist::Zilla::Plugin::License name: '@DROLSKY/License' version: '6.011' - class: Dist::Zilla::Plugin::ExecDir name: '@DROLSKY/ExecDir' version: '6.011' - class: Dist::Zilla::Plugin::ShareDir name: '@DROLSKY/ShareDir' version: '6.011' - class: Dist::Zilla::Plugin::Manifest name: '@DROLSKY/Manifest' version: '6.011' - class: Dist::Zilla::Plugin::CheckVersionIncrement name: '@DROLSKY/CheckVersionIncrement' version: '0.121750' - class: Dist::Zilla::Plugin::TestRelease name: '@DROLSKY/TestRelease' version: '6.011' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@DROLSKY/ConfirmRelease' version: '6.011' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@DROLSKY/UploadToCPAN' version: '6.011' - class: Dist::Zilla::Plugin::VersionFromMainModule name: '@DROLSKY/VersionFromMainModule' version: '0.03' - class: Dist::Zilla::Plugin::Authority name: '@DROLSKY/Authority' version: '1.009' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@DROLSKY/AutoPrereqs' version: '6.011' - class: Dist::Zilla::Plugin::CopyFilesFromBuild name: '@DROLSKY/CopyFilesFromBuild' version: '0.170880' - class: Dist::Zilla::Plugin::GitHub::Meta name: '@DROLSKY/GitHub::Meta' version: '0.44' - class: Dist::Zilla::Plugin::GitHub::Update config: Dist::Zilla::Plugin::GitHub::Update: metacpan: 1 name: '@DROLSKY/GitHub::Update' version: '0.44' - class: Dist::Zilla::Plugin::MetaResources name: '@DROLSKY/MetaResources' version: '6.011' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: '@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '6.011' include_underscores: 0 Dist::Zilla::Role::MetaProvider::Provider: $Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002004' inherit_missing: '1' inherit_version: '1' meta_noindex: '1' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000033' version: '0.004' name: '@DROLSKY/MetaProvides::Package' version: '2.004003' - class: Dist::Zilla::Plugin::Meta::Contributors name: '@DROLSKY/Meta::Contributors' version: '0.003' - class: Dist::Zilla::Plugin::MetaConfig name: '@DROLSKY/MetaConfig' version: '6.011' - class: Dist::Zilla::Plugin::MetaJSON name: '@DROLSKY/MetaJSON' version: '6.011' - class: Dist::Zilla::Plugin::MetaYAML name: '@DROLSKY/MetaYAML' version: '6.011' - class: Dist::Zilla::Plugin::NextRelease name: '@DROLSKY/NextRelease' version: '6.011' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: '@DROLSKY/Test::More with subtest' version: '6.011' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@DROLSKY/Modules for use with tidyall' version: '6.011' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@DROLSKY/Test::Version which fixes https://github.com/plicease/Test-Version/issues/7' version: '6.011' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 0 check_all_prereqs: 0 modules: - Dist::Zilla::PluginBundle::DROLSKY phase: build run_under_travis: 0 skip: [] name: '@DROLSKY/Dist::Zilla::PluginBundle::DROLSKY' version: '0.054' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 1 check_all_prereqs: 1 modules: [] phase: release run_under_travis: 0 skip: - Dist::Zilla::Plugin::DROLSKY::Contributors - Dist::Zilla::Plugin::DROLSKY::Git::CheckFor::CorrectBranch - Dist::Zilla::Plugin::DROLSKY::License - Dist::Zilla::Plugin::DROLSKY::TidyAll - Dist::Zilla::Plugin::DROLSKY::WeaverConfig - Pod::Weaver::PluginBundle::DROLSKY name: '@DROLSKY/PromptIfStale' version: '0.054' - class: Dist::Zilla::Plugin::Test::Pod::Coverage::Configurable name: '@DROLSKY/Test::Pod::Coverage::Configurable' version: '0.07' - class: Dist::Zilla::Plugin::Test::PodSpelling config: Dist::Zilla::Plugin::Test::PodSpelling: directories: - bin - lib spell_cmd: '' stopwords: - DROLSKY - "DROLSKY's" - FreeBSD - "Linux's" - OpenBSD - PayPal - Rolsky - "Rolsky's" - distro - drolsky - userspace wordlist: Pod::Wordlist name: '@DROLSKY/Test::PodSpelling' version: '2.007005' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@DROLSKY/PodSyntaxTests' version: '6.011' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@DROLSKY/RunExtraTests' version: '0.029' - class: Dist::Zilla::Plugin::MojibakeTests name: '@DROLSKY/MojibakeTests' version: '0.8' - class: Dist::Zilla::Plugin::Test::CleanNamespaces config: Dist::Zilla::Plugin::Test::CleanNamespaces: filename: xt/author/clean-namespaces.t skips: [] name: '@DROLSKY/Test::CleanNamespaces' version: '0.006' - class: Dist::Zilla::Plugin::Test::CPAN::Changes config: Dist::Zilla::Plugin::Test::CPAN::Changes: changelog: Changes name: '@DROLSKY/Test::CPAN::Changes' version: '0.012' - class: Dist::Zilla::Plugin::Test::CPAN::Meta::JSON name: '@DROLSKY/Test::CPAN::Meta::JSON' version: '0.004' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':ExecFiles' - ':InstallModules' - ':TestFiles' trailing_whitespace: 1 name: '@DROLSKY/Test::EOL' version: '0.19' - class: Dist::Zilla::Plugin::Test::NoTabs config: Dist::Zilla::Plugin::Test::NoTabs: filename: xt/author/no-tabs.t finder: - ':InstallModules' - ':ExecFiles' - ':TestFiles' name: '@DROLSKY/Test::NoTabs' version: '0.15' - class: Dist::Zilla::Plugin::Test::Portability config: Dist::Zilla::Plugin::Test::Portability: options: '' name: '@DROLSKY/Test::Portability' version: '2.001000' - class: Dist::Zilla::Plugin::Test::TidyAll name: '@DROLSKY/Test::TidyAll' version: '0.04' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@DROLSKY/Test::ReportPrereqs' version: '0.027' - class: Dist::Zilla::Plugin::Test::Version name: '@DROLSKY/Test::Version' version: '1.09' - class: Dist::Zilla::Plugin::DROLSKY::Contributors name: '@DROLSKY/DROLSKY::Contributors' version: '0.89' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: git_version: 2.16.1 include_authors: 0 include_releaser: 1 order_by: name paths: [] name: '@DROLSKY/Git::Contributors' version: '0.032' - class: Dist::Zilla::Plugin::SurgicalPodWeaver config: Dist::Zilla::Plugin::PodWeaver: config_plugins: - '@DROLSKY' finder: - ':InstallModules' - ':ExecFiles' plugins: - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: '4.015' - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: '4.015' - class: Pod::Weaver::Plugin::SingleEncoding name: '@DROLSKY/SingleEncoding' version: '4.015' - class: Pod::Weaver::Plugin::Transformer name: '@DROLSKY/List' version: '4.015' - class: Pod::Weaver::Plugin::Transformer name: '@DROLSKY/Verbatim' version: '4.015' - class: Pod::Weaver::Section::Region name: '@DROLSKY/header' version: '4.015' - class: Pod::Weaver::Section::Name name: '@DROLSKY/Name' version: '4.015' - class: Pod::Weaver::Section::Version name: '@DROLSKY/Version' version: '4.015' - class: Pod::Weaver::Section::Region name: '@DROLSKY/prelude' version: '4.015' - class: Pod::Weaver::Section::Generic name: SYNOPSIS version: '4.015' - class: Pod::Weaver::Section::Generic name: DESCRIPTION version: '4.015' - class: Pod::Weaver::Section::Generic name: OVERVIEW version: '4.015' - class: Pod::Weaver::Section::Collect name: ATTRIBUTES version: '4.015' - class: Pod::Weaver::Section::Collect name: METHODS version: '4.015' - class: Pod::Weaver::Section::Collect name: FUNCTIONS version: '4.015' - class: Pod::Weaver::Section::Collect name: TYPES version: '4.015' - class: Pod::Weaver::Section::Leftovers name: '@DROLSKY/Leftovers' version: '4.015' - class: Pod::Weaver::Section::Region name: '@DROLSKY/postlude' version: '4.015' - class: Pod::Weaver::Section::GenerateSection name: '@DROLSKY/generate SUPPORT' version: '1.06' - class: Pod::Weaver::Section::AllowOverride name: '@DROLSKY/allow override SUPPORT' version: '0.05' - class: Pod::Weaver::Section::GenerateSection name: '@DROLSKY/generate SOURCE' version: '1.06' - class: Pod::Weaver::Section::GenerateSection name: '@DROLSKY/generate DONATIONS' version: '1.06' - class: Pod::Weaver::Section::Authors name: '@DROLSKY/Authors' version: '4.015' - class: Pod::Weaver::Section::Contributors name: '@DROLSKY/Contributors' version: '0.009' - class: Pod::Weaver::Section::Legal name: '@DROLSKY/Legal' version: '4.015' - class: Pod::Weaver::Section::Region name: '@DROLSKY/footer' version: '4.015' name: '@DROLSKY/SurgicalPodWeaver' version: '0.0023' - class: Dist::Zilla::Plugin::DROLSKY::WeaverConfig name: '@DROLSKY/DROLSKY::WeaverConfig' version: '0.89' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: '@DROLSKY/README.md in build' version: '0.163250' - class: Dist::Zilla::Plugin::GenerateFile::FromShareDir config: Dist::Zilla::Plugin::GenerateFile::FromShareDir: destination_filename: CONTRIBUTING.md dist: Dist-Zilla-PluginBundle-DROLSKY encoding: UTF-8 has_xs: '0' location: build source_filename: CONTRIBUTING.md Dist::Zilla::Role::RepoFileInjector: allow_overwrite: 1 repo_root: . version: '0.007' name: '@DROLSKY/Generate CONTRIBUTING.md' version: '0.013' - class: Dist::Zilla::Plugin::InstallGuide name: '@DROLSKY/InstallGuide' version: '1.200007' - class: Dist::Zilla::Plugin::CPANFile name: '@DROLSKY/CPANFile' version: '6.011' - class: Dist::Zilla::Plugin::DROLSKY::License name: '@DROLSKY/DROLSKY::License' version: '0.89' - class: Dist::Zilla::Plugin::CheckStrictVersion name: '@DROLSKY/CheckStrictVersion' version: '0.001' - class: Dist::Zilla::Plugin::CheckSelfDependency config: Dist::Zilla::Plugin::CheckSelfDependency: finder: - ':InstallModules' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000033' version: '0.004' name: '@DROLSKY/CheckSelfDependency' version: '0.011' - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@DROLSKY/CheckPrereqsIndexed' version: '0.020' - class: Dist::Zilla::Plugin::DROLSKY::Git::CheckFor::CorrectBranch config: Dist::Zilla::Role::Git::Repo: git_version: 2.16.1 repo_root: . name: '@DROLSKY/DROLSKY::Git::CheckFor::CorrectBranch' version: '0.89' - class: Dist::Zilla::Plugin::EnsureChangesHasContent name: '@DROLSKY/EnsureChangesHasContent' version: '0.02' - class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts config: Dist::Zilla::Role::Git::Repo: git_version: 2.16.1 repo_root: . name: '@DROLSKY/Git::CheckFor::MergeConflicts' version: '0.014' - class: Dist::Zilla::Plugin::DROLSKY::TidyAll name: '@DROLSKY/DROLSKY::TidyAll' version: '0.89' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - CONTRIBUTING.md - Changes - LICENSE - Makefile.PL - README.md - cpanfile - tidyall.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.16.1 repo_root: . name: '@DROLSKY/Git::Check' version: '2.043' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: v%v%n%n%c Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - CONTRIBUTING.md - Changes - LICENSE - Makefile.PL - README.md - cpanfile - tidyall.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.16.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@DROLSKY/Commit generated files' version: '2.043' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: v0.28 tag_format: v%v tag_message: v%v Dist::Zilla::Role::Git::Repo: git_version: 2.16.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@DROLSKY/Git::Tag' version: '2.043' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: git_version: 2.16.1 repo_root: . name: '@DROLSKY/Git::Push' version: '2.043' - class: Dist::Zilla::Plugin::BumpVersionAfterRelease config: Dist::Zilla::Plugin::BumpVersionAfterRelease: finders: - ':ExecFiles' - ':InstallModules' global: 0 munge_makefile_pl: 1 name: '@DROLSKY/BumpVersionAfterRelease' version: '0.017' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: 'Bump version after release' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - dist.ini allow_dirty_match: - (?^:.+) changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.16.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@DROLSKY/Commit version bump' version: '2.043' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: git_version: 2.16.1 repo_root: . name: '@DROLSKY/Push version bump' version: '2.043' - class: Dist::Zilla::Plugin::OptionalFeature config: Dist::Zilla::Plugin::OptionalFeature: always_recommend: 0 always_suggest: 1 description: 'Inotify support for faster notification on Linux' name: Inotify phase: runtime prereqs: Linux::Inotify2: '1.2' prompt: 0 require_develop: 0 type: recommends name: Inotify version: '0.023' - class: Dist::Zilla::Plugin::OptionalFeature config: Dist::Zilla::Plugin::OptionalFeature: always_recommend: 0 always_suggest: 1 description: 'KQueue support for faster notification on BSD & OSX' name: KQueue phase: runtime prereqs: IO::KQueue: '0' prompt: 0 require_develop: 0 type: recommends name: KQueue version: '0.023' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.011' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.011' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.011' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.011' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.011' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.011' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.011' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.011' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.011' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.011' - class: Dist::Zilla::Plugin::FinderCode name: '@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '6.011' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '6.011' x_authority: cpan:DROLSKY x_contributors: - 'Aaron Crane ' - 'H. Merijn Branch ' - 'Karen Etheridge ' x_serialization_backend: 'YAML::Tiny version 1.70' File-ChangeNotify-0.28/perltidyrc0000644000175000017500000000045513240163307016645 0ustar autarchautarch-l=78 -i=4 -ci=4 -se -b -bar -boc -vt=0 -vtc=0 -cti=0 -pt=1 -bt=1 -sbt=1 -bbt=1 -nolq -npro -nsfs --blank-lines-before-packages=0 --opening-hash-brace-right --no-outdent-long-comments --iterations=2 -wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" File-ChangeNotify-0.28/t/0000775000175000017500000000000013240163307015002 5ustar autarchautarchFile-ChangeNotify-0.28/t/00-report-prereqs.t0000644000175000017500000001342613240163307020402 0ustar autarchautarch#!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do './t/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; my $cpan_meta_error; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if $mod eq 'perl'; next if grep { $_ eq $mod } @exclude; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( $cpan_meta_error || @dep_errors ) { diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; } if ( $cpan_meta_error ) { my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; } if ( @dep_errors ) { diag join("\n", "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass; # vim: ts=4 sts=4 sw=4 et: File-ChangeNotify-0.28/t/all.t0000644000175000017500000000017713240163307015742 0ustar autarchautarchuse strict; use warnings; use lib 't/lib'; use File::ChangeNotify::TestHelper; File::ChangeNotify::TestHelper::run_tests(); File-ChangeNotify-0.28/t/excluded-dirs.t0000644000175000017500000000201213240163307017714 0ustar autarchautarchuse strict; use warnings; use FindBin; use File::ChangeNotify::Watcher::Default; use File::Spec; use Test::More; my $root = File::Spec->catfile( $FindBin::Bin, '..' ); sub f { File::Spec->catfile( $root, @_ ) } my $watcher = File::ChangeNotify::Watcher::Default->new( directories => f(), exclude => [ f('foo'), f('bar'), f( 'excluded', 'dir' ), qr{(?:\\|/)r[^\\/]+$}, qr{(?:\\|/)\.[^\\/]*$}, sub { 0; }, ] ); ok( !$watcher->_path_is_excluded( f('quux') ), 'included dir' ); ok( $watcher->_path_is_excluded( f('foo') ), 'excluded dir' ); ok( !$watcher->_path_is_excluded( f( 'foo', 'bar' ) ), 'subdirs not excluded with string exclusion' ); ok( $watcher->_path_is_excluded( f( 'left', 'right' ) ), 'excluded by regex' ); ok( $watcher->_path_is_excluded( f('.hidden') ), 'excluding hidden dirs with regex' ); ok( !$watcher->_path_is_excluded( f( '.hidden', 'file' ) ), 'hidden dir regex does not exclude subdirs' ); done_testing(); File-ChangeNotify-0.28/t/00-report-prereqs.dd0000644000175000017500000001006713240163307020524 0ustar autarchautarchdo { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0' } }, 'develop' => { 'requires' => { 'Code::TidyAll' => '0.56', 'Code::TidyAll::Plugin::SortLines::Naturally' => '0.000003', 'Code::TidyAll::Plugin::Test::Vars' => '0.02', 'Parallel::ForkManager' => '1.19', 'Perl::Critic' => '1.126', 'Perl::Tidy' => '20160302', 'Pod::Coverage::Moose' => '0', 'Pod::Coverage::TrustPod' => '0', 'Pod::Wordlist' => '0', 'Test::CPAN::Changes' => '0.19', 'Test::CPAN::Meta::JSON' => '0.16', 'Test::CleanNamespaces' => '0.15', 'Test::Code::TidyAll' => '0.50', 'Test::EOL' => '0', 'Test::Mojibake' => '0', 'Test::More' => '0.96', 'Test::NoTabs' => '0', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.08', 'Test::Portability::Files' => '0', 'Test::Spelling' => '0.12', 'Test::Vars' => '0.009', 'Test::Version' => '2.05', 'parent' => '0' } }, 'runtime' => { 'requires' => { 'Carp' => '0', 'Class::Load' => '0', 'File::Find' => '0', 'File::Spec' => '0', 'Module::Pluggable::Object' => '0', 'Module::Runtime' => '0', 'Moo' => '1.006', 'Moo::Role' => '0', 'Time::HiRes' => '0', 'Type::Utils' => '0', 'Types::Standard' => '0', 'namespace::autoclean' => '0', 'strict' => '0', 'warnings' => '0' }, 'suggests' => { 'IO::KQueue' => '0', 'Linux::Inotify2' => '1.2' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'Data::Dumper' => '0', 'Exporter' => '0', 'ExtUtils::MakeMaker' => '0', 'File::Path' => '0', 'File::Spec' => '0', 'File::Temp' => '0', 'FindBin' => '0', 'Test::Exception' => '0', 'Test::More' => '0.96', 'Test::Requires' => '0', 'Test::Without::Module' => '0', 'base' => '0', 'lib' => '0' } } }; $x; }File-ChangeNotify-0.28/t/lib/0000775000175000017500000000000013240163307015550 5ustar autarchautarchFile-ChangeNotify-0.28/t/lib/File/0000775000175000017500000000000013240163307016427 5ustar autarchautarchFile-ChangeNotify-0.28/t/lib/File/ChangeNotify/0000775000175000017500000000000013240163307021005 5ustar autarchautarchFile-ChangeNotify-0.28/t/lib/File/ChangeNotify/TestHelper.pm0000644000175000017500000003016313240163307023423 0ustar autarchautarchpackage File::ChangeNotify::TestHelper; use strict; use warnings; use Data::Dumper; use File::ChangeNotify; use File::Temp qw( tempdir ); use File::Path qw( mkpath rmtree ); use Test::Exception; use Test::More; use base 'Exporter'; ## no critic (Modules::ProhibitAutomaticExportation) our @EXPORT = qw( run_tests ); ## use critic our $_DESC; ## no critic (ValuesAndExpressions::ProhibitLeadingZeros) sub run_tests { my @classes = 'File::ChangeNotify::Watcher::Default'; push @classes, File::ChangeNotify->usable_classes(); for my $class (@classes) { ( my $short = $class ) =~ s/^File::ChangeNotify::Watcher:://; local $_DESC = "[with $short - blocking]"; _shared_tests( $class, \&_blocking ); local $_DESC = "[with $short - nonblocking]"; _shared_tests( $class, \&_nonblocking ); _exclude_tests( $class, \&_nonblocking ); _symlink_tests($class); } done_testing(); } sub _blocking { my $watcher = shift; return $watcher->wait_for_events(); } sub _nonblocking { my $watcher = shift; return $watcher->new_events(); } sub _shared_tests { _basic_tests(@_); _multi_event_tests(@_); _filter_tests(@_); _dir_add_remove_tests(@_); _create_and_rename_tests(@_); } sub _basic_tests { my $class = shift; my $events_sub = shift; my $dir = tempdir( CLEANUP => 1 ); my $watcher = $class->new( directories => $dir, follow_symlinks => 0, sleep_interval => 0, ); my $path = "$dir/whatever"; create_file($path); _check_events( 1, [ $events_sub->($watcher) ], [ { path => $path, type => 'create', }, ], "added one file ($path)", ); modify_file($path); _check_events( 1, [ $events_sub->($watcher) ], [ { path => $path, type => 'modify', }, ], "modified one file ($path)", ); delete_file($path); _check_events( 1, [ $events_sub->($watcher) ], [ { path => $path, type => 'delete', }, ], "deleted one file ($path)", ); } sub _multi_event_tests { my $class = shift; my $events_sub = shift; my $dir = tempdir( CLEANUP => 1 ); my $watcher = $class->new( directories => $dir, follow_symlinks => 0, sleep_interval => 0, ); my $path1 = "$dir/whatever"; create_file($path1); modify_file($path1); delete_file($path1); my $path2 = "$dir/another"; create_file($path2); modify_file($path2); if ( $watcher->sees_all_events() ) { _check_events( 5, [ $events_sub->($watcher) ], [ { path => $path1, type => 'create', }, { path => $path1, type => 'modify', }, { path => $path1, type => 'delete', }, { path => $path2, type => 'create', }, { path => $path2, type => 'modify', }, ], "added/modified/deleted $path1 and added/modified $path2", ); } else { _check_events( 1, [ $events_sub->($watcher) ], [ { path => $path2, type => 'create', }, ], "added/modified/deleted $path1 and added/modified $path2", ); } } sub _create_and_rename_tests { my $class = shift; my $events_sub = shift; my $dir = tempdir( CLEANUP => 1 ); my $watcher = $class->new( directories => $dir, follow_symlinks => 0, filter => qr/\.txt/, sleep_interval => 0, ); my $path = "$dir/file.txt"; my $temp_path = "$dir/file.txt-tmp"; create_file($temp_path); rename $temp_path, $path or die "Cannot rename $temp_path to $path: $!"; my @events = $events_sub->($watcher); # The filter matches the temporary file as well as the final file, but # whether we get any events on the temporary file depends on the backend in # use. (KQueue on Mac OS doesn't report events for the temporary, but # Inotify on Linux does.) Changing the filter to match only the final file # would work, but the test would then hang under a version of Inotify that # isn't patched to treat IN_MOVED_TO as a 'create' event (because no events # would ever match). So ignore events that aren't for the final file. _is_events( [ grep { $_->path eq $path } @events ], [ { path => $path, type => 'create', }, ], 'single creation event on final file for create/rename', ) or diag( Dumper( \@events ) ); } sub _filter_tests { my $class = shift; my $events_sub = shift; my $dir = tempdir( CLEANUP => 1 ); my $watcher = $class->new( directories => $dir, follow_symlinks => 0, filter => qr/^foo/, sleep_interval => 0, ); my $path1 = "$dir/not-included"; create_file($path1); modify_file($path1); delete_file($path1); my $path2 = "$dir/foo.txt"; create_file($path2); _check_events( 1, [ $events_sub->($watcher) ], [ { path => $path2, type => 'create', }, ], 'file not matching filter is ignored but foo.txt is noted', ); } sub _dir_add_remove_tests { my $class = shift; my $events_sub = shift; my $dir = tempdir( CLEANUP => 1 ); my $watcher = $class->new( directories => $dir, follow_symlinks => 0, sleep_interval => 0, ); my $subdir1 = "$dir/subdir1"; my $subdir2 = "$dir/subdir2"; mkpath( $subdir1, 0, 0755 ); rmtree($subdir1); mkpath( $subdir2, 0, 0755 ); my $path = "$subdir2/whatever"; create_file($path); if ( $watcher->sees_all_events() ) { _check_events( 4, [ $events_sub->($watcher) ], [ { path => $subdir1, type => 'create', }, { path => $subdir1, type => 'delete', }, { path => $subdir2, type => 'create', }, { path => $path, type => 'create', }, ], "created/delete $subdir1 and created one file ($path) in a new subdir ($subdir2)", ); } else { _check_events( 2, [ $events_sub->($watcher) ], [ { path => $subdir2, type => 'create', }, { path => $path, type => 'create', }, ], "created/delete $subdir1 and created one file ($path) in a new subdir ($subdir2)", ); } rmtree($subdir2); _check_events( 2, # The Default & Inotify watchers have different orders for these events [ sort { $a->path() cmp $b->path() } $events_sub->($watcher) ], [ { path => $subdir2, type => 'delete', }, { path => $path, type => 'delete', }, ], "deleted $subdir2", ); } sub _exclude_tests { my $class = shift; my $events_sub = shift; my $dir = tempdir( CLEANUP => 1 ); my $watcher = $class->new( directories => $dir, follow_symlinks => 0, sleep_interval => 0, exclude => [ qr/\bignored-dir\b/, qr/\.ignore$/, ], ); my $included = "$dir/include"; create_file($included); _check_events( 1, [ $events_sub->($watcher) ], [ { path => $included, type => 'create', }, ], "added/modified/deleted $included", ); mkpath( "$dir/ignored-dir", 0, 0755 ); my $excluded_dir = "$dir/ignored-dir/foo"; create_file($excluded_dir); _check_events( 0, [ $events_sub->($watcher) ], [], "created $excluded_dir - should be ignored", ); my $excluded_file = "$dir/foo.ignore"; create_file($excluded_file); _check_events( 0, [ $events_sub->($watcher) ], [], "created $excluded_file - should be ignored", ); } sub _symlink_tests { my $class = shift; my $dir1 = tempdir( CLEANUP => 1 ); my $dir2 = tempdir( CLEANUP => 1 ); my $symlink = "$dir1/other"; SKIP: { skip 'This platform does not support symlinks.', 3 unless eval { ## no critic (InputOutput::RequireCheckedSyscalls) symlink $dir2 => $symlink; 1; }; my $watcher = $class->new( directories => $dir1, follow_symlinks => 0, sleep_interval => 0, ); my $path = "$dir2/file"; create_file($path); delete_file($path); _check_events( 0, [ $watcher->new_events() ], [], 'no events for symlinked dir when not following symlinks', ); $watcher = $class->new( directories => $dir1, follow_symlinks => 1, sleep_interval => 0, ); create_file($path); my $expected_path = "$symlink/file"; _check_events( 1, [ $watcher->new_events() ], [ { path => $expected_path, type => 'create', }, ], 'one event for symlinked dir when following symlinks', ); my $dir3 = tempdir( CLEANUP => 1 ); symlink "$dir3/.", "$dir3/self" or die $!; symlink "$dir3/input-circular1", "$dir3/input-circular2" or die $!; symlink "$dir3/input-circular2", "$dir3/input-circular1" or die $!; lives_ok { File::ChangeNotify->instantiate_watcher( directories => $dir3, follow_symlinks => 1, ); } 'made watcher for directory with circular symlinks'; } } sub _check_events { my $count = shift; my $got_events = shift; my $expect_events = shift; my $desc = shift; local $Test::Builder::Level = $Test::Builder::Level + 1; my $noun = $count == 1 ? 'event' : 'events'; is( scalar @{$got_events}, $count, "got $count $noun $_DESC" ) or diag( Dumper $got_events); return unless $count; _is_events( $got_events, $expect_events, $desc, ); } sub _is_events { my $got = shift; my $expected = shift; my $desc = shift; local $Test::Builder::Level = $Test::Builder::Level + 1; is_deeply( [ map { { path => $_->path(), type => $_->type() } } @{$got} ], $expected, "$desc $_DESC" ); } sub create_file { my $path = shift; diag("Creating $path"); open my $fh, '>', $path or die "Cannot write to $path: $!"; close $fh or die "Cannot write to $path: $!"; } sub modify_file { my $path = shift; diag("Modifying $path"); die "No such file $path!\n" unless -f $path; open my $fh, '>>', $path or die "Cannot write to $path: $!"; print {$fh} "1\n" or die "Cannot write to $path: $!"; close $fh or die "Cannot write to $path: $!"; } sub delete_file { my $path = shift; diag("Deleting $path"); die "No such file $path!\n" unless -f $path; unlink $path or die "Cannot unlink $path: $!"; } 1; File-ChangeNotify-0.28/t/instantiate-twice.t0000644000175000017500000000112313240163307020616 0ustar autarchautarchuse strict; use warnings; use Test::Requires { 'Test::Without::Module' => 0, }; use Test::More; use Test::Without::Module qw( Linux::Inotify2 ); use File::ChangeNotify; my $watcher1 = File::ChangeNotify->instantiate_watcher( directories => 't' ); my $watcher2 = File::ChangeNotify->instantiate_watcher( directories => 't' ); ok( $watcher1->does('File::ChangeNotify::Watcher'), 'first watcher does the File::ChangeNotify::Watcher role' ); ok( $watcher2->does('File::ChangeNotify::Watcher'), 'second watcher does the File::ChangeNotify::Watcher role' ); done_testing(); File-ChangeNotify-0.28/xt/0000775000175000017500000000000013240163307015172 5ustar autarchautarchFile-ChangeNotify-0.28/xt/release/0000775000175000017500000000000013240163307016612 5ustar autarchautarchFile-ChangeNotify-0.28/xt/release/cpan-changes.t0000644000175000017500000000034413240163307021325 0ustar autarchautarchuse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CPAN::Changes 0.012 use Test::More 0.96 tests => 1; use Test::CPAN::Changes; subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; File-ChangeNotify-0.28/xt/release/meta-json.t0000644000175000017500000000006413240163307020672 0ustar autarchautarch#!perl use Test::CPAN::Meta::JSON; meta_json_ok(); File-ChangeNotify-0.28/xt/release/try-load.t0000644000175000017500000000073413240163307020534 0ustar autarchautarchuse strict; use warnings; use Test::More; use File::ChangeNotify; ## no critic (Subroutines::ProtectPrivateSubs) ok( File::ChangeNotify::_try_load('File::ChangeNotify::Watcher::Default'), 'can load Default watcher' ); ok( File::ChangeNotify::_try_load('File::ChangeNotify::Watcher::Inotify'), 'can load Inotify watcher' ); ok( !File::ChangeNotify::_try_load('File::ChangeNotify::Watcher::KQueue'), 'cannot load KQueue watcher' ); done_testing(); File-ChangeNotify-0.28/xt/author/0000775000175000017500000000000013240163307016474 5ustar autarchautarchFile-ChangeNotify-0.28/xt/author/clean-namespaces.t0000644000175000017500000000036113240163307022056 0ustar autarchautarchuse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CleanNamespaces 0.006 use Test::More 0.94; use Test::CleanNamespaces 0.15; subtest all_namespaces_clean => sub { all_namespaces_clean() }; done_testing; File-ChangeNotify-0.28/xt/author/eol.t0000644000175000017500000000121313240163307017433 0ustar autarchautarchuse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.19 use Test::More 0.88; use Test::EOL; my @files = ( 'lib/File/ChangeNotify.pm', 'lib/File/ChangeNotify/Event.pm', 'lib/File/ChangeNotify/Watcher.pm', 'lib/File/ChangeNotify/Watcher/Default.pm', 'lib/File/ChangeNotify/Watcher/Inotify.pm', 'lib/File/ChangeNotify/Watcher/KQueue.pm', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/all.t', 't/excluded-dirs.t', 't/instantiate-twice.t', 't/lib/File/ChangeNotify/TestHelper.pm' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; File-ChangeNotify-0.28/xt/author/test-version.t0000644000175000017500000000063713240163307021327 0ustar autarchautarchuse strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::Version 1.09 use Test::Version; my @imports = qw( version_all_ok ); my $params = { is_strict => 1, has_version => 1, multiple => 0, }; push @imports, $params if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); Test::Version->import(@imports); version_all_ok; done_testing; File-ChangeNotify-0.28/xt/author/portability.t0000644000175000017500000000026713240163307021226 0ustar autarchautarchuse strict; use warnings; use Test::More; eval 'use Test::Portability::Files'; plan skip_all => 'Test::Portability::Files required for testing portability' if $@; run_tests(); File-ChangeNotify-0.28/xt/author/no-tabs.t0000644000175000017500000000116113240163307020221 0ustar autarchautarchuse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15 use Test::More 0.88; use Test::NoTabs; my @files = ( 'lib/File/ChangeNotify.pm', 'lib/File/ChangeNotify/Event.pm', 'lib/File/ChangeNotify/Watcher.pm', 'lib/File/ChangeNotify/Watcher/Default.pm', 'lib/File/ChangeNotify/Watcher/Inotify.pm', 'lib/File/ChangeNotify/Watcher/KQueue.pm', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/all.t', 't/excluded-dirs.t', 't/instantiate-twice.t', 't/lib/File/ChangeNotify/TestHelper.pm' ); notabs_ok($_) foreach @files; done_testing; File-ChangeNotify-0.28/xt/author/pod-coverage.t0000644000175000017500000000254213240163307021235 0ustar autarchautarch#!perl # This file was automatically generated by Dist::Zilla::Plugin::Test::Pod::Coverage::Configurable 0.07. use Test::Pod::Coverage 1.08; use Test::More 0.88; BEGIN { if ( $] <= 5.008008 ) { plan skip_all => 'These tests require Pod::Coverage::TrustPod, which only works with Perl 5.8.9+'; } } use Pod::Coverage::TrustPod; { package My::Coverage; use parent 'Pod::Coverage::Moose', 'Pod::Coverage::TrustPod'; $INC{'My/Coverage.pm'} = 1; } my %skip = map { $_ => 1 } qw( File::ChangeNotify::Watcher::Default File::ChangeNotify::Watcher::Inotify File::ChangeNotify::Watcher::KQueue ); my @modules; for my $module ( all_modules() ) { next if $skip{$module}; push @modules, $module; } plan skip_all => 'All the modules we found were excluded from POD coverage test.' unless @modules; plan tests => scalar @modules; my %trustme = ( 'File::ChangeNotify::Watcher' => [ qr/^BUILD/ ] ); my @also_private; for my $module ( sort @modules ) { pod_coverage_ok( $module, { coverage_class => 'My::Coverage', also_private => \@also_private, trustme => $trustme{$module} || [], }, "pod coverage for $module" ); } done_testing(); File-ChangeNotify-0.28/xt/author/tidyall.t0000644000175000017500000000067413240163307020330 0ustar autarchautarch# This file was automatically generated by Dist::Zilla::Plugin::Test::TidyAll v$VERSION use Test::More 0.88; BEGIN { if ( $] < 5.010 ) { plan skip_all => 'This test requires Perl version 5.010'; } } use Test::Code::TidyAll 0.24; tidyall_ok( verbose => ( exists $ENV{TEST_TIDYALL_VERBOSE} ? $ENV{TEST_TIDYALL_VERBOSE} : 1 ), jobs => ( exists $ENV{TEST_TIDYALL_JOBS} ? $ENV{TEST_TIDYALL_JOBS} : 4 ), ); done_testing; File-ChangeNotify-0.28/xt/author/mojibake.t0000644000175000017500000000015113240163307020435 0ustar autarchautarch#!perl use strict; use warnings qw(all); use Test::More; use Test::Mojibake; all_files_encoding_ok(); File-ChangeNotify-0.28/xt/author/pod-syntax.t0000644000175000017500000000025213240163307020764 0ustar autarchautarch#!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); File-ChangeNotify-0.28/xt/author/pod-spell.t0000644000175000017500000000070013240163307020553 0ustar autarchautarchuse strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007005 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ Aaron Branch ChangeNotify Crane DROLSKY DROLSKY's Dave Default Etheridge Event File FreeBSD Inotify KQueue Karen Linux's Merijn OpenBSD PayPal Rolsky Rolsky's Watcher arc autarch brand distro drolsky ether lib userspace File-ChangeNotify-0.28/tidyall.ini0000644000175000017500000000157513240163307016710 0ustar autarchautarch[PerlCritic] select = **/*.{pl,pm,t,psgi} ignore = .build/**/* ignore = File-ChangeNotify-*/**/* ignore = blib/**/* ignore = t/00-* ignore = t/author-* ignore = t/release-* ignore = t/zzz-* ignore = xt/**/* argv = --profile=$ROOT/perlcriticrc [PerlCritic non-auto-generated xt] select = xt/release/try-load.t argv = --profile=$ROOT/perlcriticrc [PerlTidy] select = **/*.{pl,pm,t,psgi} ignore = .build/**/* ignore = File-ChangeNotify-*/**/* ignore = blib/**/* ignore = t/00-* ignore = t/author-* ignore = t/release-* ignore = t/zzz-* ignore = xt/**/* argv = --profile=$ROOT/perltidyrc [PerlTidy non-auto-generated xt] select = xt/release/try-load.t argv = --profile=$ROOT/perltidyrc [Test::Vars] select = **/*.{pl,pm,t,psgi} ignore = .build/**/* ignore = File-ChangeNotify-*/**/* ignore = blib/**/* ignore = t/00-* ignore = t/author-* ignore = t/release-* ignore = t/zzz-* ignore = xt/**/* File-ChangeNotify-0.28/INSTALL0000644000175000017500000000223613240163307015571 0ustar autarchautarchThis is the Perl distribution File-ChangeNotify. Installing File-ChangeNotify is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm File::ChangeNotify If it does not have permission to install modules to the current perl, cpanm will automatically set up and install to a local::lib in your home directory. See the local::lib documentation (https://metacpan.org/pod/local::lib) for details on enabling it in your environment. ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan File::ChangeNotify ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Makefile.PL % make && make test Then install it: % make install If your perl is system-managed, you can create a local::lib in your home directory to install modules to. For details, see the local::lib documentation: https://metacpan.org/pod/local::lib ## Documentation File-ChangeNotify documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc File::ChangeNotify File-ChangeNotify-0.28/Changes0000644000175000017500000001251013240163307016027 0ustar autarchautarch0.28 2018-02-11 - Fixed handling of the IN_MOVED_TO event for the Inotify watcher. This event was being entirely ignored, but we should just treat it as a file creation event. Fixed by Aaron Crane. PR #2. 0.27 2017-01-30 - Inflating File::ChangeNotify::Default::Watcher into a Moose object with Moose 2.2000 would cause an error or warning because of a bug in how it defined an attribute. This broke Catalyst::Restarter. 0.26 2016-05-29 - Require Moo 1.006000+. 0.25 2016-05-28 - Switched from Moose to Moo and Type::Tiny. - Switched from Class::Load to Module::Runtime. - Made File::ChangeNotify::Watcher a role instead of a parent class. - Fixed a bug where the wrong watcher class could be used the second time File::ChangeNotify->instantiate_watcher was called. - Allow the exclude parameter to accept subroutine references. Patch by H. Merijn Brand. RT #114492. 0.24 2013-11-28 - Removed used of deprecated Class::MOP::load_class(). 0.23 2013-01-26 - The new_events() watcher method blocked when using IO::Kqueue as the watcher backend. Reported and patched by Jun Kuriyama. 0.22 2012-04-13 - Remove unnecessary Perl 5.10 requirement. 0.21 2012-02-03 - The implementation of the exclude feature did not work properly in several cases. First, for the Inotify and KQueue watchers, when a new directory was created that should have been excluded, it was not. Second, it didn't work for files at all for these watchers. Reported by Jon Swartz. RT #73089. 0.20 2011-04-19 - The KQueue watcher checks that a file has a file descriptor to avoid watching closed files. Patch by Adreas Voegele. 0.19 2010-10-17 - The all.t test didn't run any tests at all if neither the Inotify nor KQueue watchers could be loaded. This was treated as a failure by test harnesses. Now we always test the Default class. 0.18 2010-10-15 - Always make a Default watcher object if we cannot load an OS-specific class. - Add Test::Exception as a test prereq. 0.17 2010-10-04 - Loading File::ChangeNotify always loads the Default watcher class. This will give a useful error message if this module's prereqs are not loaded. 0.16 2010-07-12 - Changes to avoid a warning about a useless coercion from future versions of Moose. 0.15 2010-07-09 - Add a missing prereq, namespace::autoclean. 0.14 2010-07-08 - Running the tests left behind a lot of temp directories that should have been cleaned up, but weren't. Reported by Peter Edwards. RT #59125. - License is now Artistic 2.0 0.13 2010-03-28 - Circular symlinks would cause instantiating a watcher to die with an error from File::Find. These are now ignored. Reported by Jon Schutz. RT #55883. - Fixed misspelling of IO::KQueue in auto features. Reported by Jens Rehsack. RT #54905. 0.12 2010-01-28 - Added auto_features to the Build.PL, which will give hints on what modules to install for KQueue and Inotify support. - Require Linux::Inotify 1.2+, since 1.1 apparently doesn't work with this module. Reported by Michael Grondin. RT #54069. 0.11 2009-12-07 - A test attempted to use Test::Without::Module but this wasn't in the prereq list. I've made the test check for the module and skip its tests if the module isn't present. Reported by Leon Brocard. RT #52539. 0.10 2009-12-06 - Attempting to instantiate more than one watcher failed if you were on a system where one of the watcher subclasses could not be loaded (which is basically every system because no system has both inotify and kqueue). Patch by Mark Grimes. RT #52477. 0.09 2009-11-09 - This release fixes the excluded-dirs.t under Windows. There are no other changes in this release, so there's no need to upgrade if you have 0.08 installed. Patch by Taro Nishino. RT #51161. 0.08 2009-11-05 - Added a new exclude feature that allows you to excludes files or directories outright. Implemented by Dan Thomas. RT #51062. - Added a KQueue-based watcher written by Dan Thomas. I have no idea if this works, as I don't have BSD, but we'll assume he ran the tests on his system ;) RT #51062. 0.07 2009-06-29 - Fixed a typo in File::ChangeNotify::Watcher that causes a warning with newer versions of Moose. Reported by David Raab. Fixes RT #47431. 0.06 2009-06-03 - Created a Makefile.PL from the Build.PL. 0.05 2009-05-17 - Update the Moose::Params::Validate prereq so it requires the version we really need (0.08+). - Removed Cwd and FindBin from our prereq list. 0.04 2009-05-14 - The Default watcher would blow up when a directory it was watching was later removed. Reported by Tomas Doran. - The Inotify watcher would generate two events when a directory it was watching was removed, one delete and one unknown, rather than just a delete event. 0.03 2009-05-11 - Removed the default value for directories in the Watcher class, because setting this value is really an app-specific task. 0.02 2009-05-10 - Not having Linux::Inotify2 caused attempting to make a watcher blow up, when it should just use the Default watcher. Reported by Florian Ragwitz. - Fixes a a bug in the Default watcher that causes it die when trying to sleep in the wait_for_events method. - Fixed warnings from the Default watcher in the face of symlinks that point to nonexistent files. 0.01 2009-05-07 - First version, released on an unsuspecting world. File-ChangeNotify-0.28/README.md0000644000175000017500000000660513240163307016023 0ustar autarchautarch# NAME File::ChangeNotify - Watch for changes to files, cross-platform style # VERSION version 0.28 # SYNOPSIS use File::ChangeNotify; my $watcher = File::ChangeNotify->instantiate_watcher ( directories => [ '/my/path', '/my/other' ], filter => qr/\.(?:pm|conf|yml)$/, ); if ( my @events = $watcher->new_events() ) { ... } # blocking while ( my @events = $watcher->wait_for_events() ) { ... } # DESCRIPTION This module provides an API for creating a [File::ChangeNotify::Watcher](https://metacpan.org/pod/File::ChangeNotify::Watcher) subclass that will work on your platform. Most of the documentation for this distro is in [File::ChangeNotify::Watcher](https://metacpan.org/pod/File::ChangeNotify::Watcher). # METHODS This class provides the following methods: ## File::ChangeNotify->instantiate\_watcher(...) This method looks at each available subclass of [File::ChangeNotify::Watcher](https://metacpan.org/pod/File::ChangeNotify::Watcher) and instantiates the first one it can load, using the arguments you provided. It always tries to use the [File::ChangeNotify::Watcher::Default](https://metacpan.org/pod/File::ChangeNotify::Watcher::Default) class last, on the assumption that any other class that is available is a better option. ## File::ChangeNotify->usable\_classes() Returns a list of all the loadable [File::ChangeNotify::Watcher](https://metacpan.org/pod/File::ChangeNotify::Watcher) subclasses except for [File::ChangeNotify::Watcher::Default](https://metacpan.org/pod/File::ChangeNotify::Watcher::Default), which is always usable. # SUPPORT Bugs may be submitted at [http://rt.cpan.org/Public/Dist/Display.html?Name=File-ChangeNotify](http://rt.cpan.org/Public/Dist/Display.html?Name=File-ChangeNotify) or via email to [bug-file-changenotify@rt.cpan.org](mailto:bug-file-changenotify@rt.cpan.org). I am also usually active on IRC as 'autarch' on `irc://irc.perl.org`. # SOURCE The source code repository for File-ChangeNotify can be found at [https://github.com/houseabsolute/File-ChangeNotify](https://github.com/houseabsolute/File-ChangeNotify). # DONATIONS If you'd like to thank me for the work I've done on this module, please consider making a "donation" to me via PayPal. I spend a lot of free time creating free software, and would appreciate any support you'd care to offer. Please note that **I am not suggesting that you must do this** in order for me to continue working on this particular software. I will continue to do so, inasmuch as I have in the past, for as long as it interests me. Similarly, a donation made in this way will probably not make me work on this software much more, unless I get so many donations that I can consider working on free software full time (let's all have a chuckle at that together). To donate, log into PayPal and send money to autarch@urth.org, or use the button at [http://www.urth.org/~autarch/fs-donation.html](http://www.urth.org/~autarch/fs-donation.html). # AUTHOR Dave Rolsky # CONTRIBUTORS - Aaron Crane - H. Merijn Branch - Karen Etheridge # COPYRIGHT AND LICENSE This software is Copyright (c) 2009 - 2018 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) The full text of the license can be found in the `LICENSE` file included with this distribution. File-ChangeNotify-0.28/MANIFEST0000644000175000017500000000153713240163307015674 0ustar autarchautarch# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.011. CONTRIBUTING.md Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README.md cpanfile dist.ini lib/File/ChangeNotify.pm lib/File/ChangeNotify/Event.pm lib/File/ChangeNotify/Watcher.pm lib/File/ChangeNotify/Watcher/Default.pm lib/File/ChangeNotify/Watcher/Inotify.pm lib/File/ChangeNotify/Watcher/KQueue.pm perlcriticrc perltidyrc t/00-report-prereqs.dd t/00-report-prereqs.t t/all.t t/excluded-dirs.t t/instantiate-twice.t t/lib/File/ChangeNotify/TestHelper.pm tidyall.ini xt/author/clean-namespaces.t xt/author/eol.t xt/author/mojibake.t xt/author/no-tabs.t xt/author/pod-coverage.t xt/author/pod-spell.t xt/author/pod-syntax.t xt/author/portability.t xt/author/test-version.t xt/author/tidyall.t xt/release/cpan-changes.t xt/release/meta-json.t xt/release/try-load.t File-ChangeNotify-0.28/CONTRIBUTING.md0000644000175000017500000001020513240163307016764 0ustar autarchautarch# CONTRIBUTING Thank you for considering contributing to this distribution. This file contains instructions that will help you work with the source code. Please note that if you have any questions or difficulties, you can reach the maintainer(s) through the bug queue described later in this document (preferred), or by emailing the releaser directly. You are not required to follow any of the steps in this document to submit a patch or bug report; these are just recommendations, intended to help you (and help us help you faster). The distribution is managed with [Dist::Zilla](https://metacpan.org/release/Dist-Zilla). However, you can still compile and test the code with the `Makefile.PL` or `Build.PL` in the repository: perl Makefile.PL make make test or perl Build.PL ./Build ./Build test As well as: $ prove -bvr t or $ perl -Mblib t/some_test_file.t You may need to satisfy some dependencies. The easiest way to satisfy dependencies is to install the last release. This is available at https://metacpan.org/release/File-ChangeNotify If you use cpanminus, you can do it without downloading the tarball first: $ cpanm --reinstall --installdeps --with-recommends File::ChangeNotify Dist::Zilla is a very powerful authoring tool, but requires a number of author-specific plugins. If you would like to use it for contributing, install it from CPAN, then run one of the following commands, depending on your CPAN client: $ cpan `dzil authordeps --missing` or $ dzil authordeps --missing | cpanm They may also be additional requirements not needed by the dzil build which are needed for tests or other development: $ cpan `dzil listdeps --author --missing` or $ dzil listdeps --author --missing | cpanm Or, you can use the 'dzil stale' command to install all requirements at once: $ cpan Dist::Zilla::App::Command::stale $ cpan `dzil stale --all` or $ cpanm Dist::Zilla::App::Command::stale $ dzil stale --all | cpanm You can also do this via cpanm directly: $ cpanm --reinstall --installdeps --with-develop --with-recommends File::ChangeNotify Once installed, here are some dzil commands you might try: $ dzil build $ dzil test $ dzil test --release $ dzil xtest $ dzil listdeps --json $ dzil build --notgz You can learn more about Dist::Zilla at http://dzil.org/. The code for this distribution is [hosted at GitHub](https://github.com/houseabsolute/File-ChangeNotify). You can submit code changes by forking the repository, pushing your code changes to your clone, and then submitting a pull request. Detailed instructions for doing that is available here: https://help.github.com/articles/creating-a-pull-request If you have found a bug, but do not have an accompanying patch to fix it, you can submit an issue report [via the web](http://rt.cpan.org/Public/Dist/Display.html?Name=File-ChangeNotify) or [via email](bug-file-changenotify@rt.cpan.org. This is a good place to send your questions about the usage of this distribution. ## Travis All pull requests for this distribution will be automatically tested by [Travis](https://travis-ci.org/) and the build status will be reported on the pull request page. If your build fails, please take a look at the output. ## TidyAll This distribution uses [Code::TidyAll](https://metacpan.org/release/Code-TidyAll) to enforce a uniform coding style. This is tested as part of the author testing suite. You can install and run tidyall by running the following commands: $ cpanm Code::TidyAll $ tidyall -a Please run this before committing your changes and address any issues it brings up. ## Contributor Names If you send a patch or pull request, your name and email address will be included in the documentation as a contributor (using the attribution on the commit or patch), unless you specifically request for it not to be. If you wish to be listed under a different name or address, you should submit a pull request to the .mailmap file to contain the correct mapping. This file was generated via Dist::Zilla::Plugin::GenerateFile::FromShareDir 0.013 from a template file originating in Dist-Zilla-PluginBundle-DROLSKY-0.89. File-ChangeNotify-0.28/cpanfile0000644000175000017500000000410613240163307016242 0ustar autarchautarchrequires "Carp" => "0"; requires "Class::Load" => "0"; requires "File::Find" => "0"; requires "File::Spec" => "0"; requires "Module::Pluggable::Object" => "0"; requires "Module::Runtime" => "0"; requires "Moo" => "1.006"; requires "Moo::Role" => "0"; requires "Time::HiRes" => "0"; requires "Type::Utils" => "0"; requires "Types::Standard" => "0"; requires "namespace::autoclean" => "0"; requires "strict" => "0"; requires "warnings" => "0"; suggests "IO::KQueue" => "0"; suggests "Linux::Inotify2" => "1.2"; on 'test' => sub { requires "Data::Dumper" => "0"; requires "Exporter" => "0"; requires "ExtUtils::MakeMaker" => "0"; requires "File::Path" => "0"; requires "File::Spec" => "0"; requires "File::Temp" => "0"; requires "FindBin" => "0"; requires "Test::Exception" => "0"; requires "Test::More" => "0.96"; requires "Test::Requires" => "0"; requires "Test::Without::Module" => "0"; requires "base" => "0"; requires "lib" => "0"; }; on 'test' => sub { recommends "CPAN::Meta" => "2.120900"; }; on 'configure' => sub { requires "ExtUtils::MakeMaker" => "0"; }; on 'develop' => sub { requires "Code::TidyAll" => "0.56"; requires "Code::TidyAll::Plugin::SortLines::Naturally" => "0.000003"; requires "Code::TidyAll::Plugin::Test::Vars" => "0.02"; requires "Parallel::ForkManager" => "1.19"; requires "Perl::Critic" => "1.126"; requires "Perl::Tidy" => "20160302"; requires "Pod::Coverage::Moose" => "0"; requires "Pod::Coverage::TrustPod" => "0"; requires "Pod::Wordlist" => "0"; requires "Test::CPAN::Changes" => "0.19"; requires "Test::CPAN::Meta::JSON" => "0.16"; requires "Test::CleanNamespaces" => "0.15"; requires "Test::Code::TidyAll" => "0.50"; requires "Test::EOL" => "0"; requires "Test::Mojibake" => "0"; requires "Test::More" => "0.96"; requires "Test::NoTabs" => "0"; requires "Test::Pod" => "1.41"; requires "Test::Pod::Coverage" => "1.08"; requires "Test::Portability::Files" => "0"; requires "Test::Spelling" => "0.12"; requires "Test::Vars" => "0.009"; requires "Test::Version" => "2.05"; requires "parent" => "0"; }; File-ChangeNotify-0.28/LICENSE0000644000175000017500000002152713240163307015551 0ustar autarchautarchThis software is Copyright (c) 2009 - 2018 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) The Artistic License 2.0 Copyright (c) 2000-2006, The Perl Foundation. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software. You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement. Definitions "Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package. "Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures. "You" and "your" means any person who would like to copy, distribute, or modify the Package. "Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. "Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. "Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees. "Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. "Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. "Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future. "Source" form means the source code, documentation source, and configuration files for the Package. "Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form. Permission for Use and Modification Without Distribution (1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. Permissions for Redistribution of the Standard Version (2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. (3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License. Distribution of Modified Versions of the Package as Source (4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following: (a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version. (b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version. (c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under (i) the Original License or (ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee received, and requires that the Source form of the Modified Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed. Distribution of Compiled Forms of the Standard Version or Modified Versions without the Source (5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license. (6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version. Aggregating or Linking the Package (7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation. (8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package. Items That are Not Considered Part of a Modified Version (9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license. General Provisions (10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. (11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license. (12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. (13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed. (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. File-ChangeNotify-0.28/META.json0000644000175000017500000011036713240163307016166 0ustar autarchautarch{ "abstract" : "Watch for changes to files, cross-platform style", "author" : [ "Dave Rolsky " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.011, CPAN::Meta::Converter version 2.150010", "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "File-ChangeNotify", "optional_features" : { "Inotify" : { "description" : "Inotify support for faster notification on Linux", "prereqs" : { "runtime" : { "recommends" : { "Linux::Inotify2" : "1.2" } } } }, "KQueue" : { "description" : "KQueue support for faster notification on BSD & OSX", "prereqs" : { "runtime" : { "recommends" : { "IO::KQueue" : "0" } } } } }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Code::TidyAll" : "0.56", "Code::TidyAll::Plugin::SortLines::Naturally" : "0.000003", "Code::TidyAll::Plugin::Test::Vars" : "0.02", "Parallel::ForkManager" : "1.19", "Perl::Critic" : "1.126", "Perl::Tidy" : "20160302", "Pod::Coverage::Moose" : "0", "Pod::Coverage::TrustPod" : "0", "Pod::Wordlist" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta::JSON" : "0.16", "Test::CleanNamespaces" : "0.15", "Test::Code::TidyAll" : "0.50", "Test::EOL" : "0", "Test::Mojibake" : "0", "Test::More" : "0.96", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08", "Test::Portability::Files" : "0", "Test::Spelling" : "0.12", "Test::Vars" : "0.009", "Test::Version" : "2.05", "parent" : "0" } }, "runtime" : { "requires" : { "Carp" : "0", "Class::Load" : "0", "File::Find" : "0", "File::Spec" : "0", "Module::Pluggable::Object" : "0", "Module::Runtime" : "0", "Moo" : "1.006", "Moo::Role" : "0", "Time::HiRes" : "0", "Type::Utils" : "0", "Types::Standard" : "0", "namespace::autoclean" : "0", "strict" : "0", "warnings" : "0" }, "suggests" : { "IO::KQueue" : "0", "Linux::Inotify2" : "1.2" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "Data::Dumper" : "0", "Exporter" : "0", "ExtUtils::MakeMaker" : "0", "File::Path" : "0", "File::Spec" : "0", "File::Temp" : "0", "FindBin" : "0", "Test::Exception" : "0", "Test::More" : "0.96", "Test::Requires" : "0", "Test::Without::Module" : "0", "base" : "0", "lib" : "0" } } }, "provides" : { "File::ChangeNotify" : { "file" : "lib/File/ChangeNotify.pm", "version" : "0.28" }, "File::ChangeNotify::Event" : { "file" : "lib/File/ChangeNotify/Event.pm", "version" : "0.28" }, "File::ChangeNotify::Watcher" : { "file" : "lib/File/ChangeNotify/Watcher.pm", "version" : "0.28" }, "File::ChangeNotify::Watcher::Default" : { "file" : "lib/File/ChangeNotify/Watcher/Default.pm", "version" : "0.28" }, "File::ChangeNotify::Watcher::Inotify" : { "file" : "lib/File/ChangeNotify/Watcher/Inotify.pm", "version" : "0.28" }, "File::ChangeNotify::Watcher::KQueue" : { "file" : "lib/File/ChangeNotify/Watcher/KQueue.pm", "version" : "0.28" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-file-changenotify@rt.cpan.org", "web" : "http://rt.cpan.org/Public/Dist/Display.html?Name=File-ChangeNotify" }, "homepage" : "http://metacpan.org/release/File-ChangeNotify", "repository" : { "type" : "git", "url" : "git://github.com/houseabsolute/File-ChangeNotify.git", "web" : "https://github.com/houseabsolute/File-ChangeNotify" } }, "version" : "0.28", "x_Dist_Zilla" : { "perl" : { "version" : "5.026001" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::MakeMaker", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@DROLSKY/MakeMaker", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "CONTRIBUTING.md", "LICENSE", "Makefile.PL", "README.md", "cpanfile" ], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "@DROLSKY/Git::GatherDir", "version" : "2.043" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@DROLSKY/ManifestSkip", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@DROLSKY/License", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@DROLSKY/ExecDir", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@DROLSKY/ShareDir", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@DROLSKY/Manifest", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::CheckVersionIncrement", "name" : "@DROLSKY/CheckVersionIncrement", "version" : "0.121750" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@DROLSKY/TestRelease", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@DROLSKY/ConfirmRelease", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@DROLSKY/UploadToCPAN", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::VersionFromMainModule", "name" : "@DROLSKY/VersionFromMainModule", "version" : "0.03" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@DROLSKY/Authority", "version" : "1.009" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@DROLSKY/AutoPrereqs", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", "name" : "@DROLSKY/CopyFilesFromBuild", "version" : "0.170880" }, { "class" : "Dist::Zilla::Plugin::GitHub::Meta", "name" : "@DROLSKY/GitHub::Meta", "version" : "0.44" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", "config" : { "Dist::Zilla::Plugin::GitHub::Update" : { "metacpan" : 1 } }, "name" : "@DROLSKY/GitHub::Update", "version" : "0.44" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "@DROLSKY/MetaResources", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.011" } ], "include_underscores" : 0 }, "Dist::Zilla::Role::MetaProvider::Provider" : { "$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002004", "inherit_missing" : 1, "inherit_version" : 1, "meta_noindex" : 1 }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000033", "version" : "0.004" } }, "name" : "@DROLSKY/MetaProvides::Package", "version" : "2.004003" }, { "class" : "Dist::Zilla::Plugin::Meta::Contributors", "name" : "@DROLSKY/Meta::Contributors", "version" : "0.003" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@DROLSKY/MetaConfig", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@DROLSKY/MetaJSON", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@DROLSKY/MetaYAML", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@DROLSKY/NextRelease", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "@DROLSKY/Test::More with subtest", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@DROLSKY/Modules for use with tidyall", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@DROLSKY/Test::Version which fixes https://github.com/plicease/Test-Version/issues/7", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 0, "check_all_prereqs" : 0, "modules" : [ "Dist::Zilla::PluginBundle::DROLSKY" ], "phase" : "build", "run_under_travis" : 0, "skip" : [] } }, "name" : "@DROLSKY/Dist::Zilla::PluginBundle::DROLSKY", "version" : "0.054" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 1, "check_all_prereqs" : 1, "modules" : [], "phase" : "release", "run_under_travis" : 0, "skip" : [ "Dist::Zilla::Plugin::DROLSKY::Contributors", "Dist::Zilla::Plugin::DROLSKY::Git::CheckFor::CorrectBranch", "Dist::Zilla::Plugin::DROLSKY::License", "Dist::Zilla::Plugin::DROLSKY::TidyAll", "Dist::Zilla::Plugin::DROLSKY::WeaverConfig", "Pod::Weaver::PluginBundle::DROLSKY" ] } }, "name" : "@DROLSKY/PromptIfStale", "version" : "0.054" }, { "class" : "Dist::Zilla::Plugin::Test::Pod::Coverage::Configurable", "name" : "@DROLSKY/Test::Pod::Coverage::Configurable", "version" : "0.07" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "config" : { "Dist::Zilla::Plugin::Test::PodSpelling" : { "directories" : [ "bin", "lib" ], "spell_cmd" : "", "stopwords" : [ "DROLSKY", "DROLSKY's", "FreeBSD", "Linux's", "OpenBSD", "PayPal", "Rolsky", "Rolsky's", "distro", "drolsky", "userspace" ], "wordlist" : "Pod::Wordlist" } }, "name" : "@DROLSKY/Test::PodSpelling", "version" : "2.007005" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@DROLSKY/PodSyntaxTests", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@DROLSKY/RunExtraTests", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "@DROLSKY/MojibakeTests", "version" : "0.8" }, { "class" : "Dist::Zilla::Plugin::Test::CleanNamespaces", "config" : { "Dist::Zilla::Plugin::Test::CleanNamespaces" : { "filename" : "xt/author/clean-namespaces.t", "skips" : [] } }, "name" : "@DROLSKY/Test::CleanNamespaces", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "config" : { "Dist::Zilla::Plugin::Test::CPAN::Changes" : { "changelog" : "Changes" } }, "name" : "@DROLSKY/Test::CPAN::Changes", "version" : "0.012" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Meta::JSON", "name" : "@DROLSKY/Test::CPAN::Meta::JSON", "version" : "0.004" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":ExecFiles", ":InstallModules", ":TestFiles" ], "trailing_whitespace" : 1 } }, "name" : "@DROLSKY/Test::EOL", "version" : "0.19" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "filename" : "xt/author/no-tabs.t", "finder" : [ ":InstallModules", ":ExecFiles", ":TestFiles" ] } }, "name" : "@DROLSKY/Test::NoTabs", "version" : "0.15" }, { "class" : "Dist::Zilla::Plugin::Test::Portability", "config" : { "Dist::Zilla::Plugin::Test::Portability" : { "options" : "" } }, "name" : "@DROLSKY/Test::Portability", "version" : "2.001000" }, { "class" : "Dist::Zilla::Plugin::Test::TidyAll", "name" : "@DROLSKY/Test::TidyAll", "version" : "0.04" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@DROLSKY/Test::ReportPrereqs", "version" : "0.027" }, { "class" : "Dist::Zilla::Plugin::Test::Version", "name" : "@DROLSKY/Test::Version", "version" : "1.09" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::Contributors", "name" : "@DROLSKY/DROLSKY::Contributors", "version" : "0.89" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "git_version" : "2.16.1", "include_authors" : 0, "include_releaser" : 1, "order_by" : "name", "paths" : [] } }, "name" : "@DROLSKY/Git::Contributors", "version" : "0.032" }, { "class" : "Dist::Zilla::Plugin::SurgicalPodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "config_plugins" : [ "@DROLSKY" ], "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "@DROLSKY/SingleEncoding", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@DROLSKY/List", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@DROLSKY/Verbatim", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@DROLSKY/header", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@DROLSKY/Name", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@DROLSKY/Version", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@DROLSKY/prelude", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "SYNOPSIS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DESCRIPTION", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "OVERVIEW", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "ATTRIBUTES", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "METHODS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "FUNCTIONS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "TYPES", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@DROLSKY/Leftovers", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@DROLSKY/postlude", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "@DROLSKY/generate SUPPORT", "version" : "1.06" }, { "class" : "Pod::Weaver::Section::AllowOverride", "name" : "@DROLSKY/allow override SUPPORT", "version" : "0.05" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "@DROLSKY/generate SOURCE", "version" : "1.06" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "@DROLSKY/generate DONATIONS", "version" : "1.06" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@DROLSKY/Authors", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "@DROLSKY/Contributors", "version" : "0.009" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@DROLSKY/Legal", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@DROLSKY/footer", "version" : "4.015" } ] } }, "name" : "@DROLSKY/SurgicalPodWeaver", "version" : "0.0023" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::WeaverConfig", "name" : "@DROLSKY/DROLSKY::WeaverConfig", "version" : "0.89" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "@DROLSKY/README.md in build", "version" : "0.163250" }, { "class" : "Dist::Zilla::Plugin::GenerateFile::FromShareDir", "config" : { "Dist::Zilla::Plugin::GenerateFile::FromShareDir" : { "destination_filename" : "CONTRIBUTING.md", "dist" : "Dist-Zilla-PluginBundle-DROLSKY", "encoding" : "UTF-8", "has_xs" : 0, "location" : "build", "source_filename" : "CONTRIBUTING.md" }, "Dist::Zilla::Role::RepoFileInjector" : { "allow_overwrite" : 1, "repo_root" : ".", "version" : "0.007" } }, "name" : "@DROLSKY/Generate CONTRIBUTING.md", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "@DROLSKY/InstallGuide", "version" : "1.200007" }, { "class" : "Dist::Zilla::Plugin::CPANFile", "name" : "@DROLSKY/CPANFile", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::License", "name" : "@DROLSKY/DROLSKY::License", "version" : "0.89" }, { "class" : "Dist::Zilla::Plugin::CheckStrictVersion", "name" : "@DROLSKY/CheckStrictVersion", "version" : "0.001" }, { "class" : "Dist::Zilla::Plugin::CheckSelfDependency", "config" : { "Dist::Zilla::Plugin::CheckSelfDependency" : { "finder" : [ ":InstallModules" ] }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000033", "version" : "0.004" } }, "name" : "@DROLSKY/CheckSelfDependency", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@DROLSKY/CheckPrereqsIndexed", "version" : "0.020" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::Git::CheckFor::CorrectBranch", "config" : { "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.16.1", "repo_root" : "." } }, "name" : "@DROLSKY/DROLSKY::Git::CheckFor::CorrectBranch", "version" : "0.89" }, { "class" : "Dist::Zilla::Plugin::EnsureChangesHasContent", "name" : "@DROLSKY/EnsureChangesHasContent", "version" : "0.02" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", "config" : { "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.16.1", "repo_root" : "." } }, "name" : "@DROLSKY/Git::CheckFor::MergeConflicts", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::TidyAll", "name" : "@DROLSKY/DROLSKY::TidyAll", "version" : "0.89" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "CONTRIBUTING.md", "Changes", "LICENSE", "Makefile.PL", "README.md", "cpanfile", "tidyall.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.16.1", "repo_root" : "." } }, "name" : "@DROLSKY/Git::Check", "version" : "2.043" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "v%v%n%n%c" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "CONTRIBUTING.md", "Changes", "LICENSE", "Makefile.PL", "README.md", "cpanfile", "tidyall.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.16.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@DROLSKY/Commit generated files", "version" : "2.043" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "v0.28", "tag_format" : "v%v", "tag_message" : "v%v" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.16.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@DROLSKY/Git::Tag", "version" : "2.043" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.16.1", "repo_root" : "." } }, "name" : "@DROLSKY/Git::Push", "version" : "2.043" }, { "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease", "config" : { "Dist::Zilla::Plugin::BumpVersionAfterRelease" : { "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 0, "munge_makefile_pl" : 1 } }, "name" : "@DROLSKY/BumpVersionAfterRelease", "version" : "0.017" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "Bump version after release" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "dist.ini" ], "allow_dirty_match" : [ "(?^:.+)" ], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.16.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@DROLSKY/Commit version bump", "version" : "2.043" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.16.1", "repo_root" : "." } }, "name" : "@DROLSKY/Push version bump", "version" : "2.043" }, { "class" : "Dist::Zilla::Plugin::OptionalFeature", "config" : { "Dist::Zilla::Plugin::OptionalFeature" : { "always_recommend" : 0, "always_suggest" : 1, "description" : "Inotify support for faster notification on Linux", "name" : "Inotify", "phase" : "runtime", "prereqs" : { "Linux::Inotify2" : "1.2" }, "prompt" : 0, "require_develop" : 0, "type" : "recommends" } }, "name" : "Inotify", "version" : "0.023" }, { "class" : "Dist::Zilla::Plugin::OptionalFeature", "config" : { "Dist::Zilla::Plugin::OptionalFeature" : { "always_recommend" : 0, "always_suggest" : 1, "description" : "KQueue support for faster notification on BSD & OSX", "name" : "KQueue", "phase" : "runtime", "prereqs" : { "IO::KQueue" : "0" }, "prompt" : 0, "require_develop" : 0, "type" : "recommends" } }, "name" : "KQueue", "version" : "0.023" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.011" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.011" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "6.011" } }, "x_authority" : "cpan:DROLSKY", "x_contributors" : [ "Aaron Crane ", "H. Merijn Branch ", "Karen Etheridge " ], "x_serialization_backend" : "Cpanel::JSON::XS version 3.0239" } File-ChangeNotify-0.28/lib/0000775000175000017500000000000013240163307015305 5ustar autarchautarchFile-ChangeNotify-0.28/lib/File/0000775000175000017500000000000013240163307016164 5ustar autarchautarchFile-ChangeNotify-0.28/lib/File/ChangeNotify/0000775000175000017500000000000013240163307020542 5ustar autarchautarchFile-ChangeNotify-0.28/lib/File/ChangeNotify/Event.pm0000644000175000017500000000431413240163307022161 0ustar autarchautarchpackage File::ChangeNotify::Event; use strict; use warnings; use namespace::autoclean; our $VERSION = '0.28'; use Types::Standard qw( Str ); use Type::Utils qw( enum ); use Moo; has path => ( is => 'ro', isa => Str, required => 1, ); has type => ( is => 'ro', isa => enum( [qw( create modify delete unknown )] ), required => 1, ); __PACKAGE__->meta()->make_immutable(); 1; # ABSTRACT: Class for file change events __END__ =pod =encoding UTF-8 =head1 NAME File::ChangeNotify::Event - Class for file change events =head1 VERSION version 0.28 =head1 SYNOPSIS my $watcher = File::ChangeNotify->instantiate_watcher( directories => [ '/my/path', '/my/other' ], filter => qr/\.(?:pm|conf|yml)$/, exclude => [ 't', 'root', qr(/(?!\.)[^/]+$) ], ); for my $event ( $watcher->new_events() ) { print $event->path(), ' - ', $event->type(), "\n"; } =head1 DESCRIPTION This class provides information about a change to a specific file or directory. =head1 METHODS =head2 File::ChangeNotify::Event->new(...) This method creates a new event. It accepts the following arguments: =over 4 =item * path => $path The full path to the file or directory that changed. =item * type => $type The type of event. This must be one of "create", "modify", "delete", or "unknown". =back =head2 $event->path() Returns the path of the changed file or directory. =head2 $event->type() Returns the type of event. =head1 SUPPORT Bugs may be submitted at L or via email to L. I am also usually active on IRC as 'autarch' on C. =head1 SOURCE The source code repository for File-ChangeNotify can be found at L. =head1 AUTHOR Dave Rolsky =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2009 - 2018 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) The full text of the license can be found in the F file included with this distribution. =cut File-ChangeNotify-0.28/lib/File/ChangeNotify/Watcher.pm0000644000175000017500000001553313240163307022502 0ustar autarchautarchpackage File::ChangeNotify::Watcher; use strict; use warnings; use namespace::autoclean; our $VERSION = '0.28'; use Class::Load qw( load_class ); use File::ChangeNotify::Event; use Types::Standard qw( ArrayRef Bool ClassName CodeRef Num RegexpRef Str ); use Type::Utils -all; use Moo::Role; has filter => ( is => 'ro', isa => RegexpRef, default => sub {qr/.*/}, ); #<<< my $dir_t = subtype as Str, where { -d $_ }, message { "$_ is not a valid directory" }; my $array_of_dirs_t = subtype as ArrayRef[Str], where { map {-d} @{$_}; }, message {"@{$_} is not a list of valid directories"}; coerce $array_of_dirs_t, from $dir_t, via { [$_] }; #>>> has directories => ( is => 'ro', writer => '_set_directories', isa => $array_of_dirs_t, required => 1, coerce => 1, ); has follow_symlinks => ( is => 'ro', isa => Bool, default => 0, ); has event_class => ( is => 'ro', isa => ClassName, default => 'File::ChangeNotify::Event', ); has sleep_interval => ( is => 'ro', isa => Num, default => 2, ); my $files_or_regexps_or_code_t = subtype as ArrayRef [ Str | RegexpRef | CodeRef ]; has exclude => ( is => 'ro', isa => $files_or_regexps_or_code_t, default => sub { [] }, ); sub BUILD { my $self = shift; load_class( $self->event_class() ); } sub new_events { my $self = shift; return $self->_interesting_events(); } ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) sub _path_is_excluded { my $self = shift; my $path = shift; foreach my $excluded ( @{ $self->exclude } ) { if ( my $ref = ref $excluded ) { if ( $ref eq 'Regexp' ) { return 1 if $path =~ /$excluded/; } elsif ( $ref eq 'CODE' ) { local $_ = $path; return 1 if $excluded->($path); } } else { return 1 if $path eq $excluded; } } return; } sub _remove_directory { my $self = shift; my $dir = shift; $self->_set_directories( [ grep { $_ ne $dir } @{ $self->directories() } ] ); } ## use critic 1; # ABSTRACT: Role consumed by all watchers __END__ =pod =encoding UTF-8 =head1 NAME File::ChangeNotify::Watcher - Role consumed by all watchers =head1 VERSION version 0.28 =head1 SYNOPSIS my $watcher = File::ChangeNotify->instantiate_watcher ( directories => [ '/my/path', '/my/other' ], filter => qr/\.(?:pm|conf|yml)$/, exclude => ['t', 'root', qr(/(?!\.)[^/]+$), sub { -e && ! -r }], ); if ( my @events = $watcher->new_events() ) { ... } # blocking while ( my @events = $watcher->wait_for_events() ) { ... } =head1 DESCRIPTION A C monitors a directory for changes made to any file. You can provide a regular expression to filter out files you are not interested in. It handles the addition of new subdirectories by adding them to the watch list. Note that the actual granularity of what each watcher class reports may vary. Implementations that hook into some sort of kernel event interface (Inotify, for example) have much better knowledge of exactly what changes are happening than one implemented purely in userspace code (like the Default class). By default, events are returned in the form of L objects, but this can be overridden by providing an "event_class" attribute to the constructor. The watcher can operate in a blocking/callback style, or you can simply ask it for a list of new events as needed. =head1 METHODS =head2 File::ChangeNotify::Watcher::Subclass->new(...) This method creates a new watcher. It accepts the following arguments: =over 4 =item * directories => $path =item * directories => \@paths This argument is required. It can be either one or many paths which should be watched for changes. =item * filter => qr/.../ This is an optional regular expression that will be used to check if a file is of interest. This filter is only applied to files. By default, all files are included. =item * exclude => [...] An optional list of paths to exclude. This list can contain plain strings, regular expressions, or subroutine references. If you provide a string it should contain the complete path to be excluded. If you provide a sub, it should return a true value for paths to be excluded e.g. C<< exclude => [ sub { -e && ! -r } ], >>. The path will be passed as the first argument to the subroutine as well as in a localized C<$_>. The paths can be either directories or specific files. If the exclusion matches a directory, all of its files and subdirectories are ignored. =item * follow_symlinks => $bool By default, symlinks are ignored. Set this to true to follow them. If this symlinks are being followed, symlinks to files and directories will be followed. Directories will be watched, and changes for directories and files reported. =item * sleep_interval => $number For watchers which call C to implement the C<< $watcher->wait_for_events() >> method, this argument controls how long it sleeps for. The value is a number in seconds. The default is 2 seconds. =item * event_class => $class This can be used to change the class used to report events. By default, this is L. =back =head2 $watcher->wait_for_events() This method causes the watcher to block until it sees interesting events, and then return them as a list. Some watcher subclasses may implement blocking as a sleep loop, while others may actually block. =head2 $watcher->new_events() This method returns a list of any interesting events seen since the last time the watcher checked. =head2 $watcher->sees_all_events() If this is true, the watcher will report on all events. Some watchers, like the Default subclass, are not smart enough to track things like a file being created and then immediately deleted, and can only detect changes between snapshots of the file system. Other watchers, like the Inotify subclass, see all events that happen and report on them. =head1 SUPPORT Bugs may be submitted at L or via email to L. I am also usually active on IRC as 'autarch' on C. =head1 SOURCE The source code repository for File-ChangeNotify can be found at L. =head1 AUTHOR Dave Rolsky =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2009 - 2018 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) The full text of the license can be found in the F file included with this distribution. =cut File-ChangeNotify-0.28/lib/File/ChangeNotify/Watcher/0000775000175000017500000000000013240163307022137 5ustar autarchautarchFile-ChangeNotify-0.28/lib/File/ChangeNotify/Watcher/Inotify.pm0000644000175000017500000001403713240163307024121 0ustar autarchautarchpackage File::ChangeNotify::Watcher::Inotify; use strict; use warnings; use namespace::autoclean; our $VERSION = '0.28'; use File::Find (); use Linux::Inotify2 1.2; use Types::Standard qw( Bool Int ); use Type::Utils qw( class_type ); use Moo; has is_blocking => ( is => 'ro', isa => Bool, default => 1, ); has _inotify => ( is => 'ro', isa => class_type('Linux::Inotify2'), default => sub { Linux::Inotify2->new() or die "Cannot construct a Linux::Inotify2 object: $!"; }, init_arg => undef, ); has _mask => ( is => 'ro', isa => Int, lazy => 1, builder => '_build_mask', ); with 'File::ChangeNotify::Watcher'; sub sees_all_events {1} sub BUILD { my $self = shift; $self->_inotify()->blocking( $self->is_blocking() ); # If this is done via a lazy_build then the call to # ->_watch_directory ends up causing endless recursion when it # calls ->_inotify itself. $self->_watch_directory($_) for @{ $self->directories() }; return $self; } sub wait_for_events { my $self = shift; $self->_inotify()->blocking(1); while (1) { my @events = $self->_interesting_events(); return @events if @events; } } around new_events => sub { my $orig = shift; my $self = shift; $self->_inotify()->blocking(0); return $self->$orig(@_); }; sub _interesting_events { my $self = shift; my $filter = $self->filter(); my @interesting; # This may be a blocking read, in which case it will not return until # something happens. For Catalyst, the restarter will end up calling # ->watch again after handling the changes. for my $event ( $self->_inotify()->read() ) { # An excluded path will show up here if ... # # Something created a new directory and that directory needs to be # excluded or when the exclusion excludes a file, not a dir. next if $self->_path_is_excluded( $event->fullname() ); if ( $event->IN_CREATE() && $event->IN_ISDIR() ) { $self->_watch_directory( $event->fullname() ); push @interesting, $event; push @interesting, $self->_fake_events_for_new_dir( $event->fullname() ); } elsif ( $event->IN_DELETE_SELF() ) { $self->_remove_directory( $event->fullname() ); } # We just want to check the _file_ name elsif ( $event->name() =~ /$filter/ ) { push @interesting, $event; } } return map { $_->can('path') ? $_ : $self->_convert_event($_) } @interesting; } sub _build_mask { my $self = shift; my $mask = IN_MODIFY | IN_CREATE | IN_DELETE | IN_DELETE_SELF | IN_MOVE_SELF | IN_MOVED_TO; $mask |= IN_DONT_FOLLOW unless $self->follow_symlinks(); return $mask; } sub _watch_directory { my $self = shift; my $dir = shift; # A directory could be created & then deleted before we get a # chance to act on it. return unless -d $dir; File::Find::find( { wanted => sub { my $path = $File::Find::name; if ( $self->_path_is_excluded($path) ) { $File::Find::prune = 1; return; } $self->_add_watch_if_dir($path); }, follow_fast => ( $self->follow_symlinks() ? 1 : 0 ), no_chdir => 1, follow_skip => 2, }, $dir ); } sub _add_watch_if_dir { my $self = shift; my $path = shift; return if -l $path && !$self->follow_symlinks(); return unless -d $path; return if $self->_path_is_excluded($path); $self->_inotify()->watch( $path, $self->_mask() ); } sub _fake_events_for_new_dir { my $self = shift; my $dir = shift; return unless -d $dir; my @events; File::Find::find( { wanted => sub { my $path = $File::Find::name; return if $path eq $dir; if ( $self->_path_is_excluded($path) ) { $File::Find::prune = 1; return; } push @events, $self->event_class()->new( path => $path, type => 'create', ); }, follow_fast => ( $self->follow_symlinks() ? 1 : 0 ), no_chdir => 1 }, $dir ); return @events; } sub _convert_event { my $self = shift; my $event = shift; return $self->event_class()->new( path => $event->fullname(), type => ( $event->IN_CREATE() || $event->IN_MOVED_TO() ? 'create' : $event->IN_MODIFY() ? 'modify' : $event->IN_DELETE() ? 'delete' : 'unknown' ), ); } __PACKAGE__->meta()->make_immutable(); 1; # ABSTRACT: Inotify-based watcher subclass __END__ =pod =encoding UTF-8 =head1 NAME File::ChangeNotify::Watcher::Inotify - Inotify-based watcher subclass =head1 VERSION version 0.28 =head1 DESCRIPTION This class implements watching by using the L module. This only works on Linux 2.6.13 or newer. This watcher is much more efficient and accurate than the C class. =head1 SUPPORT Bugs may be submitted at L or via email to L. I am also usually active on IRC as 'autarch' on C. =head1 SOURCE The source code repository for File-ChangeNotify can be found at L. =head1 AUTHOR Dave Rolsky =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2009 - 2018 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) The full text of the license can be found in the F file included with this distribution. =cut File-ChangeNotify-0.28/lib/File/ChangeNotify/Watcher/KQueue.pm0000644000175000017500000001504013240163307023672 0ustar autarchautarchpackage File::ChangeNotify::Watcher::KQueue; use strict; use warnings; use namespace::autoclean; our $VERSION = '0.28'; use File::Find (); use IO::KQueue; use Types::Standard qw( HashRef Int ); use Type::Utils qw( class_type ); use Moo; has absorb_delay => ( is => 'ro', isa => Int, default => 100, ); has _kqueue => ( is => 'ro', isa => class_type('IO::KQueue'), default => sub { IO::KQueue->new }, init_arg => undef, ); # We need to keep hold of filehandles for all the directories *and* files in the # tree. KQueue events will be automatically deleted when the filehandles go out # of scope. has _files => ( is => 'ro', isa => HashRef, default => sub { {} }, init_arg => undef, ); with 'File::ChangeNotify::Watcher'; sub sees_all_events {0} sub BUILD { my ($self) = @_; $self->_watch_dir($_) for @{ $self->directories }; } sub wait_for_events { my ($self) = @_; while (1) { my @events = $self->_get_events; return @events if @events; } } sub new_events { my ($self) = @_; my @events = $self->_get_events(0); } sub _get_events { my ( $self, $timeout ) = @_; my @kevents = $self->_kqueue->kevent( defined $timeout ? $timeout : () ); # Events come in groups, wait for a short period to absorb any extra ones # that might happen immediately after the ones we've detected. push @kevents, $self->_kqueue->kevent( $self->absorb_delay ) if $self->absorb_delay; my @events; foreach my $kevent (@kevents) { my $path = $kevent->[KQ_UDATA]; next if $self->_path_is_excluded($path); my $flags = $kevent->[KQ_FFLAGS]; # Delete - this works reasonably well with KQueue if ( $flags & NOTE_DELETE ) { delete $self->_files->{$path}; push @events, $self->_event( $path, 'delete' ); } # Rename - represented as deletes and creates elsif ( $flags & NOTE_RENAME ) { # Renamed dirs # Use the stored filehandle (it survives renaming) to identify a dir # and remove any filehandles we're storing to its contents my $fh = $self->_files->{$path}; if ( -d $fh ) { foreach my $stored_path ( keys %{ $self->_files } ) { next unless index( $stored_path, $path ) == 0; delete $self->_files->{$stored_path}; push @events, $self->_event( $stored_path, 'delete' ); } } # Renamed files else { delete $self->_files->{$path}; push @events, $self->_event( $path, 'delete' ); } } # Modify/Create - writes to files indicate modification, but we get # writes to dirs too, which indicates a file (or dir) was created or # removed from the dir. Deletes are picked up by delete events, but to # find created files we have to scan the dir again. elsif ( $flags & NOTE_WRITE ) { if ( -f $path ) { push @events, $self->_event( $path, 'modify' ); } elsif ( -d $path ) { push @events, map { $self->_event( $_, 'create' ) } $self->_watch_dir($path); } } } return @events; } sub _event { my ( $self, $path, $type ) = @_; return $self->event_class->new( path => $path, type => $type ); } sub _watch_dir { my ( $self, $dir ) = @_; my @new_files; # use find(), finddepth() doesn't support pruning $self->_find( $dir, sub { my $path = $File::Find::name; # Don't monitor anything below excluded dirs return $File::Find::prune = 1 if $self->_path_is_excluded($path); # Skip file names that don't match the filter return unless $self->_is_included_file($path); # Skip if we're watching it already return if $self->_files->{$path}; $self->_watch_file($path); push @new_files, $path; } ); return @new_files; } sub _is_included_file { my ( $self, $path ) = @_; return 1 if -d $path; my $filter = $self->filter; my $filename = ( File::Spec->splitpath($path) )[2]; return 1 if $filename =~ m{$filter}; } sub _find { my ( $self, $dir, $wanted ) = @_; File::Find::find( { wanted => $wanted, no_chdir => 1, follow_fast => ( $self->follow_symlinks ? 1 : 0 ),, follow_skip => 2, }, $dir, ); } sub _watch_file { my ( $self, $file ) = @_; ## no critic (InputOutput::RequireBriefOpen) # Don't panic if we can't open a file open my $fh, '<', $file or warn "Can't open '$file': $!"; return unless $fh && defined fileno $fh; # Store this filehandle (this will automatically nuke any existing events # assigned to the file) $self->_files->{$file} = $fh; # Watch it for changes $self->_kqueue->EV_SET( fileno($fh), EVFILT_VNODE, EV_ADD | EV_CLEAR, NOTE_DELETE | NOTE_WRITE | NOTE_RENAME | NOTE_REVOKE, 0, $file, ); } __PACKAGE__->meta->make_immutable; 1; __END__ =head1 NAME File::ChangeNotify::Watcher::KQueue - KQueue-based watcher subclass =head1 DESCRIPTION This class implements watching using L, which must be installed for it to work. This is a BSD alternative to Linux's Inotify and similar event-based systems. =head1 CAVEATS Although this watcher is more efficient and accurate than the C class, in order to monitor files and directories, it must open filehandles to each of them. Because many BSD systems have relatively low defaults for the maximum number of files each process can open, you may find you run out of file descriptors. On FreeBSD, you can check (and alter) your system's settings with C if necessary. The important keys are: C and C. You can see how many files your system current has open with C. On OpenBSD, the C keys are C and C. Per-process limits are set in F. See L for details. =head1 SUPPORT I (Dave Rolsky) cannot test this class, as I have no BSD systems. Reasonable patches will be applied as-is, and when possible I will consult with Dan Thomas or other BSD users before releasing. =head1 AUTHOR Dan Thomas, Edan@cpan.orgE =cut File-ChangeNotify-0.28/lib/File/ChangeNotify/Watcher/Default.pm0000644000175000017500000001125613240163307024064 0ustar autarchautarchpackage File::ChangeNotify::Watcher::Default; use strict; use warnings; use namespace::autoclean; our $VERSION = '0.28'; use File::Find qw( finddepth ); use File::Spec; use Time::HiRes qw( sleep ); use Types::Standard qw( HashRef ); # Trying to import this just blows up on Win32, and checking # Time::HiRes::d_hires_stat() _also_ blows up on Win32. BEGIN { ## no critic (ErrorHandling::RequireCheckingReturnValueOfEval) eval { Time::HiRes->import('stat') }; } use Moo; with 'File::ChangeNotify::Watcher'; has _map => ( is => 'ro', writer => '_set_map', isa => HashRef, default => sub { {} }, ); sub sees_all_events {0} sub BUILD { my $self = shift; $self->_set_map( $self->_build_map() ); } sub _build_map { my $self = shift; my %map; File::Find::find( { wanted => sub { my $path = $File::Find::name; if ( $self->_path_is_excluded($path) ) { $File::Find::prune = 1; return; } my $entry = $self->_entry_for_map($path) or return; $map{$path} = $entry; }, follow_fast => ( $self->follow_symlinks() ? 1 : 0 ), no_chdir => 1, follow_skip => 2, }, @{ $self->directories() }, ); return \%map; } sub _entry_for_map { my $self = shift; my $path = shift; my $is_dir = -d $path ? 1 : 0; return if -l $path && !$is_dir; unless ($is_dir) { my $filter = $self->filter(); return unless ( File::Spec->splitpath($path) )[2] =~ /$filter/; } return { is_dir => $is_dir, mtime => _mtime(*_), size => ( $is_dir ? 0 : -s _ ), }; } # It seems that Time::HiRes's stat does not act exactly like the # built-in, so if I do ( stat _ )[9] it will not work (grr). sub _mtime { my @stat = stat; return $stat[9]; } sub wait_for_events { my $self = shift; while (1) { my @events = $self->_interesting_events(); return @events if @events; sleep $self->sleep_interval(); } } sub _interesting_events { my $self = shift; my @interesting; my $old_map = $self->_map(); my $new_map = $self->_build_map(); for my $path ( sort keys %{$old_map} ) { if ( !exists $new_map->{$path} ) { if ( $old_map->{$path}{is_dir} ) { $self->_remove_directory($path); } push @interesting, $self->event_class()->new( path => $path, type => 'delete', ); } elsif ( !$old_map->{$path}{is_dir} && ( $old_map->{$path}{mtime} != $new_map->{$path}{mtime} || $old_map->{$path}{size} != $new_map->{$path}{size} ) ) { push @interesting, $self->event_class()->new( path => $path, type => 'modify', ); } } for my $path ( sort grep { !exists $old_map->{$_} } keys %{$new_map} ) { if ( -d $path ) { push @interesting, $self->event_class()->new( path => $path, type => 'create', ), ; } else { push @interesting, $self->event_class()->new( path => $path, type => 'create', ); } } $self->_set_map($new_map); return @interesting; } __PACKAGE__->meta()->make_immutable(); 1; # ABSTRACT: Fallback default watcher subclass __END__ =pod =encoding UTF-8 =head1 NAME File::ChangeNotify::Watcher::Default - Fallback default watcher subclass =head1 VERSION version 0.28 =head1 DESCRIPTION This class implements watching by comparing two snapshots of the filesystem tree. It if inefficient and dumb, and so it is the subclass of last resort. Its C<< $watcher->wait_for_events() >> method sleeps between comparisons of the filesystem snapshot it takes. =head1 SUPPORT Bugs may be submitted at L or via email to L. I am also usually active on IRC as 'autarch' on C. =head1 SOURCE The source code repository for File-ChangeNotify can be found at L. =head1 AUTHOR Dave Rolsky =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2009 - 2018 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) The full text of the license can be found in the F file included with this distribution. =cut File-ChangeNotify-0.28/lib/File/ChangeNotify.pm0000644000175000017500000001056213240163307021102 0ustar autarchautarchpackage File::ChangeNotify; use strict; use warnings; use namespace::autoclean; our $VERSION = '0.28'; use Carp qw( confess ); # We load this up front to make sure that the prereq modules are installed. use File::ChangeNotify::Watcher::Default; use Module::Pluggable::Object; use Module::Runtime qw( use_module ); # First version to support coerce => 1 use Moo 1.006 (); sub instantiate_watcher { my $class = shift; my @usable = $class->usable_classes(); return $usable[0]->new(@_) if @usable; return File::ChangeNotify::Watcher::Default->new(@_); } { my $finder = Module::Pluggable::Object->new( search_path => 'File::ChangeNotify::Watcher' ); my $loaded = 0; my @usable_classes = (); sub usable_classes { return @usable_classes if $loaded; @usable_classes = grep { _try_load($_) } sort grep { $_ ne 'File::ChangeNotify::Watcher::Default' } $finder->plugins(); $loaded = 1; return @usable_classes; } } sub _try_load { my $module = shift; my $ok = eval { use_module($module) }; my $e = $@; return $module if $ok; die $e if $e && $e !~ /Can\'t locate|did not return a true value/; } 1; # ABSTRACT: Watch for changes to files, cross-platform style __END__ =pod =encoding UTF-8 =head1 NAME File::ChangeNotify - Watch for changes to files, cross-platform style =head1 VERSION version 0.28 =head1 SYNOPSIS use File::ChangeNotify; my $watcher = File::ChangeNotify->instantiate_watcher ( directories => [ '/my/path', '/my/other' ], filter => qr/\.(?:pm|conf|yml)$/, ); if ( my @events = $watcher->new_events() ) { ... } # blocking while ( my @events = $watcher->wait_for_events() ) { ... } =head1 DESCRIPTION This module provides an API for creating a L subclass that will work on your platform. Most of the documentation for this distro is in L. =head1 METHODS This class provides the following methods: =head2 File::ChangeNotify->instantiate_watcher(...) This method looks at each available subclass of L and instantiates the first one it can load, using the arguments you provided. It always tries to use the L class last, on the assumption that any other class that is available is a better option. =head2 File::ChangeNotify->usable_classes() Returns a list of all the loadable L subclasses except for L, which is always usable. =head1 SUPPORT Bugs may be submitted at L or via email to L. I am also usually active on IRC as 'autarch' on C. =head1 SOURCE The source code repository for File-ChangeNotify can be found at L. =head1 DONATIONS If you'd like to thank me for the work I've done on this module, please consider making a "donation" to me via PayPal. I spend a lot of free time creating free software, and would appreciate any support you'd care to offer. Please note that B in order for me to continue working on this particular software. I will continue to do so, inasmuch as I have in the past, for as long as it interests me. Similarly, a donation made in this way will probably not make me work on this software much more, unless I get so many donations that I can consider working on free software full time (let's all have a chuckle at that together). To donate, log into PayPal and send money to autarch@urth.org, or use the button at L. =head1 AUTHOR Dave Rolsky =head1 CONTRIBUTORS =for stopwords Aaron Crane H. Merijn Branch Karen Etheridge =over 4 =item * Aaron Crane =item * H. Merijn Branch =item * Karen Etheridge =back =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2009 - 2018 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) The full text of the license can be found in the F file included with this distribution. =cut File-ChangeNotify-0.28/perlcriticrc0000644000175000017500000000350513240163307017150 0ustar autarchautarchseverity = 3 verbose = 11 theme = (core && (pbp || bugs || maintenance || cosmetic || complexity || security || tests)) || moose program-extensions = pl psgi t exclude = Subroutines::ProhibitCallsToUndeclaredSubs [BuiltinFunctions::ProhibitStringySplit] severity = 3 [CodeLayout::RequireTrailingCommas] severity = 3 [ControlStructures::ProhibitCStyleForLoops] severity = 3 [InputOutput::RequireCheckedSyscalls] functions = :builtins exclude_functions = sleep severity = 3 [RegularExpressions::ProhibitComplexRegexes] max_characters = 200 [RegularExpressions::ProhibitUnusualDelimiters] severity = 3 [Subroutines::ProhibitUnusedPrivateSubroutines] private_name_regex = _(?!build)\w+ [TestingAndDebugging::ProhibitNoWarnings] allow = redefine [ValuesAndExpressions::ProhibitEmptyQuotes] severity = 3 [ValuesAndExpressions::ProhibitInterpolationOfLiterals] severity = 3 [ValuesAndExpressions::RequireUpperCaseHeredocTerminator] severity = 3 [Variables::ProhibitPackageVars] add_packages = Carp Test::Builder [-Subroutines::RequireFinalReturn] # This incorrectly thinks signatures are prototypes. [-Subroutines::ProhibitSubroutinePrototypes] [-ErrorHandling::RequireCarping] # No need for /xsm everywhere [-RegularExpressions::RequireDotMatchAnything] [-RegularExpressions::RequireExtendedFormatting] [-RegularExpressions::RequireLineBoundaryMatching] # http://stackoverflow.com/questions/2275317/why-does-perlcritic-dislike-using-shift-to-populate-subroutine-variables [-Subroutines::RequireArgUnpacking] # "use v5.14" is more readable than "use 5.014" [-ValuesAndExpressions::ProhibitVersionStrings] # Explicitly returning undef is a _good_ thing in many cases, since it # prevents very common errors when using a sub in list context to construct a # hash and ending up with a missing value or key. [-Subroutines::ProhibitExplicitReturnUndef] File-ChangeNotify-0.28/Makefile.PL0000644000175000017500000000420713240163307016512 0ustar autarchautarch# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.011. use strict; use warnings; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Watch for changes to files, cross-platform style", "AUTHOR" => "Dave Rolsky ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "File-ChangeNotify", "LICENSE" => "artistic_2", "NAME" => "File::ChangeNotify", "PREREQ_PM" => { "Carp" => 0, "Class::Load" => 0, "File::Find" => 0, "File::Spec" => 0, "Module::Pluggable::Object" => 0, "Module::Runtime" => 0, "Moo" => "1.006", "Moo::Role" => 0, "Time::HiRes" => 0, "Type::Utils" => 0, "Types::Standard" => 0, "namespace::autoclean" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "Data::Dumper" => 0, "Exporter" => 0, "ExtUtils::MakeMaker" => 0, "File::Path" => 0, "File::Spec" => 0, "File::Temp" => 0, "FindBin" => 0, "Test::Exception" => 0, "Test::More" => "0.96", "Test::Requires" => 0, "Test::Without::Module" => 0, "base" => 0, "lib" => 0 }, "VERSION" => "0.28", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "Class::Load" => 0, "Data::Dumper" => 0, "Exporter" => 0, "ExtUtils::MakeMaker" => 0, "File::Find" => 0, "File::Path" => 0, "File::Spec" => 0, "File::Temp" => 0, "FindBin" => 0, "Module::Pluggable::Object" => 0, "Module::Runtime" => 0, "Moo" => "1.006", "Moo::Role" => 0, "Test::Exception" => 0, "Test::More" => "0.96", "Test::Requires" => 0, "Test::Without::Module" => 0, "Time::HiRes" => 0, "Type::Utils" => 0, "Types::Standard" => 0, "base" => 0, "lib" => 0, "namespace::autoclean" => 0, "strict" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs);