File-ChangeNotify-0.31/0000755000175000017500000000000013415423005014525 5ustar autarchautarchFile-ChangeNotify-0.31/Makefile.PL0000644000175000017500000000432213415423005016500 0ustar autarchautarch# This Makefile.PL for File-ChangeNotify was generated by # Dist::Zilla::Plugin::DROLSKY::MakeMaker 1.01 # and Dist::Zilla::Plugin::MakeMaker::Awesome 0.42. # Don't edit it but the dist.ini and plugins used to construct it. 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, "Fcntl" => 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" => { "Exporter" => 0, "ExtUtils::MakeMaker" => 0, "File::Path" => 0, "File::Spec" => 0, "File::Temp" => 0, "FindBin" => 0, "Test2::V0" => 0, "Test::More" => "1.302015", "Test::Requires" => 0, "Test::Without::Module" => 0, "base" => 0, "lib" => 0 }, "VERSION" => "0.31", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "Exporter" => 0, "ExtUtils::MakeMaker" => 0, "Fcntl" => 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, "Test2::V0" => 0, "Test::More" => "1.302015", "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); File-ChangeNotify-0.31/META.yml0000644000175000017500000005755113415423005016013 0ustar autarchautarch--- abstract: 'Watch for changes to files, cross-platform style' author: - 'Dave Rolsky ' build_requires: Exporter: '0' ExtUtils::MakeMaker: '0' File::Path: '0' File::Spec: '0' File::Temp: '0' FindBin: '0' Test2::V0: '0' Test::More: '1.302015' 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.012, 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.31' File::ChangeNotify::Event: file: lib/File/ChangeNotify/Event.pm version: '0.31' File::ChangeNotify::Watcher: file: lib/File/ChangeNotify/Watcher.pm version: '0.31' File::ChangeNotify::Watcher::Default: file: lib/File/ChangeNotify/Watcher/Default.pm version: '0.31' File::ChangeNotify::Watcher::Inotify: file: lib/File/ChangeNotify/Watcher/Inotify.pm version: '0.31' File::ChangeNotify::Watcher::KQueue: file: lib/File/ChangeNotify/Watcher/KQueue.pm version: '0.31' requires: Carp: '0' Fcntl: '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.31' x_Dist_Zilla: perl: version: '5.026002' plugins: - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - CODE_OF_CONDUCT.md - 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.045' - class: Dist::Zilla::Plugin::ManifestSkip name: '@DROLSKY/ManifestSkip' version: '6.012' - class: Dist::Zilla::Plugin::License name: '@DROLSKY/License' version: '6.012' - class: Dist::Zilla::Plugin::ExecDir name: '@DROLSKY/ExecDir' version: '6.012' - class: Dist::Zilla::Plugin::ShareDir name: '@DROLSKY/ShareDir' version: '6.012' - class: Dist::Zilla::Plugin::Manifest name: '@DROLSKY/Manifest' version: '6.012' - class: Dist::Zilla::Plugin::CheckVersionIncrement name: '@DROLSKY/CheckVersionIncrement' version: '0.121750' - class: Dist::Zilla::Plugin::TestRelease name: '@DROLSKY/TestRelease' version: '6.012' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@DROLSKY/ConfirmRelease' version: '6.012' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@DROLSKY/UploadToCPAN' version: '6.012' - class: Dist::Zilla::Plugin::VersionFromMainModule config: Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000033' version: '0.006' name: '@DROLSKY/VersionFromMainModule' version: '0.04' - class: Dist::Zilla::Plugin::Authority name: '@DROLSKY/Authority' version: '1.009' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@DROLSKY/AutoPrereqs' version: '6.012' - class: Dist::Zilla::Plugin::CopyFilesFromBuild name: '@DROLSKY/CopyFilesFromBuild' version: '0.170880' - class: Dist::Zilla::Plugin::GitHub::Meta name: '@DROLSKY/GitHub::Meta' version: '0.47' - class: Dist::Zilla::Plugin::GitHub::Update config: Dist::Zilla::Plugin::GitHub::Update: metacpan: 1 name: '@DROLSKY/GitHub::Update' version: '0.47' - class: Dist::Zilla::Plugin::MetaResources name: '@DROLSKY/MetaResources' version: '6.012' - 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.012' 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.006' 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.012' - class: Dist::Zilla::Plugin::MetaJSON name: '@DROLSKY/MetaJSON' version: '6.012' - class: Dist::Zilla::Plugin::MetaYAML name: '@DROLSKY/MetaYAML' version: '6.012' - class: Dist::Zilla::Plugin::NextRelease name: '@DROLSKY/NextRelease' version: '6.012' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: '@DROLSKY/Test::More with Test2' version: '6.012' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@DROLSKY/Modules for use with tidyall' version: '6.012' - 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.012' - 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.055' - 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.055' - 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.012' - class: Dist::Zilla::Plugin::DROLSKY::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: 24 name: '@DROLSKY/DROLSKY::RunExtraTests' version: '1.01' - 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: '1.01' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: git_version: 2.20.1 include_authors: 0 include_releaser: 1 order_by: name paths: [] name: '@DROLSKY/Git::Contributors' version: '0.035' - 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: '1.01' - 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.009' name: '@DROLSKY/Generate CONTRIBUTING.md' version: '0.014' - class: Dist::Zilla::Plugin::GenerateFile::FromShareDir config: Dist::Zilla::Plugin::GenerateFile::FromShareDir: destination_filename: CODE_OF_CONDUCT.md dist: Dist-Zilla-PluginBundle-DROLSKY encoding: UTF-8 has_xs: '0' location: build source_filename: CODE_OF_CONDUCT.md Dist::Zilla::Role::RepoFileInjector: allow_overwrite: 1 repo_root: . version: '0.009' name: '@DROLSKY/Generate CODE_OF_CONDUCT.md' version: '0.014' - class: Dist::Zilla::Plugin::InstallGuide name: '@DROLSKY/InstallGuide' version: '1.200012' - class: Dist::Zilla::Plugin::CPANFile name: '@DROLSKY/CPANFile' version: '6.012' - class: Dist::Zilla::Plugin::DROLSKY::License name: '@DROLSKY/DROLSKY::License' version: '1.01' - 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.006' 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.20.1 repo_root: . name: '@DROLSKY/DROLSKY::Git::CheckFor::CorrectBranch' version: '1.01' - 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.20.1 repo_root: . name: '@DROLSKY/Git::CheckFor::MergeConflicts' version: '0.014' - class: Dist::Zilla::Plugin::DROLSKY::TidyAll name: '@DROLSKY/DROLSKY::TidyAll' version: '1.01' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - CODE_OF_CONDUCT.md - CONTRIBUTING.md - Changes - LICENSE - Makefile.PL - README.md - cpanfile - tidyall.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.20.1 repo_root: . name: '@DROLSKY/Git::Check' version: '2.045' - 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: - CODE_OF_CONDUCT.md - CONTRIBUTING.md - Changes - LICENSE - Makefile.PL - README.md - cpanfile - tidyall.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.20.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@DROLSKY/Commit generated files' version: '2.045' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: v0.31 tag_format: v%v tag_message: v%v Dist::Zilla::Role::Git::Repo: git_version: 2.20.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@DROLSKY/Git::Tag' version: '2.045' - 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.20.1 repo_root: . name: '@DROLSKY/Git::Push' version: '2.045' - class: Dist::Zilla::Plugin::BumpVersionAfterRelease config: Dist::Zilla::Plugin::BumpVersionAfterRelease: finders: - ':ExecFiles' - ':InstallModules' global: 0 munge_makefile_pl: 1 name: '@DROLSKY/BumpVersionAfterRelease' version: '0.018' - 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.20.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@DROLSKY/Commit version bump' version: '2.045' - 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.20.1 repo_root: . name: '@DROLSKY/Push version bump' version: '2.045' - class: Dist::Zilla::Plugin::DROLSKY::MakeMaker config: Dist::Zilla::Plugin::MakeMaker: make_path: make version: '6.012' Dist::Zilla::Plugin::MakeMaker::Awesome: version: '0.42' Dist::Zilla::Role::TestRunner: default_jobs: 24 version: '6.012' name: '@DROLSKY/DROLSKY::MakeMaker' version: '1.01' - 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.012' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: '@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '6.012' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '6.012' x_authority: cpan:DROLSKY x_contributors: - 'Aaron Crane ' - 'H. Merijn Branch ' - 'Karen Etheridge ' x_generated_by_perl: v5.26.2 x_serialization_backend: 'YAML::Tiny version 1.73' File-ChangeNotify-0.31/Changes0000644000175000017500000001354013415423005016023 0ustar autarchautarch0.31 2019-01-09 - No changes from 0.30. 0.30 2018-10-08 (TRIAL RELEASE) - Added an optional feature to track path attribute changes (permissions, ownership) as well as to provide the old vs new attributes and/or content in modify events. Both of these features are off by default since they can use a lot more CPU or memory, especially when using otherwise low-overhead kernel-based watchers. 0.29 2018-09-25 - The change to Module::Runtime in 0.25 wasn't complete so this distro still depended on Class::Load. 0.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.31/CONTRIBUTING.md0000644000175000017500000000777413415423005016775 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` in the repository: perl Makefile.PL make make test 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 You can use [`cpanminus`](https://metacpan.org/pod/App::cpanminus) to do this without downloading the tarball first: $ cpanm --reinstall --installdeps --with-recommends File::ChangeNotify [`Dist::Zilla`](https://metacpan.org/pod/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 the following command to install the needed distros: $ dzil authordeps --missing | cpanm There may also be additional requirements not needed by the dzil build which are needed for tests or other development: $ dzil listdeps --author --missing | cpanm Or, you can use the 'dzil stale' command to install all requirements at once: $ 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 on 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. See the GitHub documentation for [detailed instructions on pull requests](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). ## Continuous Integration All pull requests for this distribution will be automatically tested on Linux by [Travis](https://travis-ci.org/houseabsolute/File-ChangeNotify) and on Windows by [AppVeyor](https://ci.appveyor.com/project/autarch/File-ChangeNotify). All CI results will be visible in the pull request on GitHub. Follow the appropriate links for details when tests fail. ## 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. ## Generated By This file was generated via Dist::Zilla::Plugin::GenerateFile::FromShareDir 0.014 from a template file originating in Dist-Zilla-PluginBundle-DROLSKY-1.01. File-ChangeNotify-0.31/LICENSE0000644000175000017500000002152713415423005015541 0ustar autarchautarchThis software is Copyright (c) 2009 - 2019 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.31/README.md0000644000175000017500000000657713415423005016023 0ustar autarchautarch# NAME File::ChangeNotify - Watch for changes to files, cross-platform style # VERSION version 0.31 # 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 - 2019 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.31/perltidyrc0000644000175000017500000000045513415423005016635 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.31/META.json0000644000175000017500000011326013415423005016151 0ustar autarchautarch{ "abstract" : "Watch for changes to files, cross-platform style", "author" : [ "Dave Rolsky " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.012, 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", "Fcntl" : "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" : { "Exporter" : "0", "ExtUtils::MakeMaker" : "0", "File::Path" : "0", "File::Spec" : "0", "File::Temp" : "0", "FindBin" : "0", "Test2::V0" : "0", "Test::More" : "1.302015", "Test::Requires" : "0", "Test::Without::Module" : "0", "base" : "0", "lib" : "0" } } }, "provides" : { "File::ChangeNotify" : { "file" : "lib/File/ChangeNotify.pm", "version" : "0.31" }, "File::ChangeNotify::Event" : { "file" : "lib/File/ChangeNotify/Event.pm", "version" : "0.31" }, "File::ChangeNotify::Watcher" : { "file" : "lib/File/ChangeNotify/Watcher.pm", "version" : "0.31" }, "File::ChangeNotify::Watcher::Default" : { "file" : "lib/File/ChangeNotify/Watcher/Default.pm", "version" : "0.31" }, "File::ChangeNotify::Watcher::Inotify" : { "file" : "lib/File/ChangeNotify/Watcher/Inotify.pm", "version" : "0.31" }, "File::ChangeNotify::Watcher::KQueue" : { "file" : "lib/File/ChangeNotify/Watcher/KQueue.pm", "version" : "0.31" } }, "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.31", "x_Dist_Zilla" : { "perl" : { "version" : "5.026002" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "CODE_OF_CONDUCT.md", "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.045" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@DROLSKY/ManifestSkip", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@DROLSKY/License", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@DROLSKY/ExecDir", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@DROLSKY/ShareDir", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@DROLSKY/Manifest", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::CheckVersionIncrement", "name" : "@DROLSKY/CheckVersionIncrement", "version" : "0.121750" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@DROLSKY/TestRelease", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@DROLSKY/ConfirmRelease", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@DROLSKY/UploadToCPAN", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::VersionFromMainModule", "config" : { "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000033", "version" : "0.006" } }, "name" : "@DROLSKY/VersionFromMainModule", "version" : "0.04" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@DROLSKY/Authority", "version" : "1.009" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@DROLSKY/AutoPrereqs", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", "name" : "@DROLSKY/CopyFilesFromBuild", "version" : "0.170880" }, { "class" : "Dist::Zilla::Plugin::GitHub::Meta", "name" : "@DROLSKY/GitHub::Meta", "version" : "0.47" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", "config" : { "Dist::Zilla::Plugin::GitHub::Update" : { "metacpan" : 1 } }, "name" : "@DROLSKY/GitHub::Update", "version" : "0.47" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "@DROLSKY/MetaResources", "version" : "6.012" }, { "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.012" } ], "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.006" } }, "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.012" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@DROLSKY/MetaJSON", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@DROLSKY/MetaYAML", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@DROLSKY/NextRelease", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "@DROLSKY/Test::More with Test2", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@DROLSKY/Modules for use with tidyall", "version" : "6.012" }, { "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.012" }, { "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.055" }, { "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.055" }, { "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.012" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 24 } }, "name" : "@DROLSKY/DROLSKY::RunExtraTests", "version" : "1.01" }, { "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" : "1.01" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "git_version" : "2.20.1", "include_authors" : 0, "include_releaser" : 1, "order_by" : "name", "paths" : [] } }, "name" : "@DROLSKY/Git::Contributors", "version" : "0.035" }, { "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" : "1.01" }, { "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.009" } }, "name" : "@DROLSKY/Generate CONTRIBUTING.md", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::GenerateFile::FromShareDir", "config" : { "Dist::Zilla::Plugin::GenerateFile::FromShareDir" : { "destination_filename" : "CODE_OF_CONDUCT.md", "dist" : "Dist-Zilla-PluginBundle-DROLSKY", "encoding" : "UTF-8", "has_xs" : 0, "location" : "build", "source_filename" : "CODE_OF_CONDUCT.md" }, "Dist::Zilla::Role::RepoFileInjector" : { "allow_overwrite" : 1, "repo_root" : ".", "version" : "0.009" } }, "name" : "@DROLSKY/Generate CODE_OF_CONDUCT.md", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "@DROLSKY/InstallGuide", "version" : "1.200012" }, { "class" : "Dist::Zilla::Plugin::CPANFile", "name" : "@DROLSKY/CPANFile", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::License", "name" : "@DROLSKY/DROLSKY::License", "version" : "1.01" }, { "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.006" } }, "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.20.1", "repo_root" : "." } }, "name" : "@DROLSKY/DROLSKY::Git::CheckFor::CorrectBranch", "version" : "1.01" }, { "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.20.1", "repo_root" : "." } }, "name" : "@DROLSKY/Git::CheckFor::MergeConflicts", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::TidyAll", "name" : "@DROLSKY/DROLSKY::TidyAll", "version" : "1.01" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "Changes", "LICENSE", "Makefile.PL", "README.md", "cpanfile", "tidyall.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.20.1", "repo_root" : "." } }, "name" : "@DROLSKY/Git::Check", "version" : "2.045" }, { "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" : [ "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "Changes", "LICENSE", "Makefile.PL", "README.md", "cpanfile", "tidyall.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.20.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@DROLSKY/Commit generated files", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "v0.31", "tag_format" : "v%v", "tag_message" : "v%v" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.20.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@DROLSKY/Git::Tag", "version" : "2.045" }, { "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.20.1", "repo_root" : "." } }, "name" : "@DROLSKY/Git::Push", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease", "config" : { "Dist::Zilla::Plugin::BumpVersionAfterRelease" : { "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 0, "munge_makefile_pl" : 1 } }, "name" : "@DROLSKY/BumpVersionAfterRelease", "version" : "0.018" }, { "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.20.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@DROLSKY/Commit version bump", "version" : "2.045" }, { "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.20.1", "repo_root" : "." } }, "name" : "@DROLSKY/Push version bump", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::MakeMaker", "config" : { "Dist::Zilla::Plugin::MakeMaker" : { "make_path" : "make", "version" : "6.012" }, "Dist::Zilla::Plugin::MakeMaker::Awesome" : { "version" : "0.42" }, "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 24, "version" : "6.012" } }, "name" : "@DROLSKY/DROLSKY::MakeMaker", "version" : "1.01" }, { "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.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.012" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "6.012" } }, "x_authority" : "cpan:DROLSKY", "x_contributors" : [ "Aaron Crane ", "H. Merijn Branch ", "Karen Etheridge " ], "x_generated_by_perl" : "v5.26.2", "x_serialization_backend" : "Cpanel::JSON::XS version 4.02" } File-ChangeNotify-0.31/CODE_OF_CONDUCT.md0000644000175000017500000000625413415423005017333 0ustar autarchautarch# Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at autarch@urth.org. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html [homepage]: https://www.contributor-covenant.org File-ChangeNotify-0.31/lib/0000755000175000017500000000000013415423005015273 5ustar autarchautarchFile-ChangeNotify-0.31/lib/File/0000755000175000017500000000000013415423005016152 5ustar autarchautarchFile-ChangeNotify-0.31/lib/File/ChangeNotify.pm0000644000175000017500000001053013415423005021065 0ustar autarchautarchpackage File::ChangeNotify; use strict; use warnings; use namespace::autoclean; our $VERSION = '0.31'; 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; 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.31 =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 - 2019 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.31/lib/File/ChangeNotify/0000755000175000017500000000000013415423005020530 5ustar autarchautarchFile-ChangeNotify-0.31/lib/File/ChangeNotify/Event.pm0000644000175000017500000000676013415423005022160 0ustar autarchautarchpackage File::ChangeNotify::Event; use strict; use warnings; use namespace::autoclean; our $VERSION = '0.31'; use Types::Standard qw( ArrayRef HashRef 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, ); has attributes => ( is => 'ro', isa => ArrayRef [HashRef], predicate => 'has_attributes', ); has content => ( is => 'ro', isa => ArrayRef, predicate => 'has_content', ); __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.31 =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. =head2 $event->has_attributes This returns true for modify events which include information about a path's attribute changes. =head2 $event->attributes If the event includes information about changes to a path's attributes, then this returns a two-element arrayref. Each element is in turn a hashref which will contain at least one of the following keys: =over 4 =item * permissions The permissions mask for the path. =item * uid The user id that owns the path. =item * gid The group id that owns the path. =back Note that only keys which changed will be included. =head2 $event->has_content This returns true for modify events which include information about a file's content. =head2 $event->content This returns a two-element arrayref where the first element is the old content and the second is the new content. B on the content to make it UTF-8.> This is done because there's no reason you couldn't use this feature with file's containing any sort of binary data. =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 - 2019 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.31/lib/File/ChangeNotify/Watcher/0000755000175000017500000000000013415423005022125 5ustar autarchautarchFile-ChangeNotify-0.31/lib/File/ChangeNotify/Watcher/Inotify.pm0000644000175000017500000001653713415423005024120 0ustar autarchautarchpackage File::ChangeNotify::Watcher::Inotify; use strict; use warnings; use namespace::autoclean; our $VERSION = '0.31'; use File::Find qw( 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 }; $self->_set_map( $self->_current_map ) if $self->modify_includes_file_attributes || $self->modify_includes_content; return; } 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; # This may be a blocking read, in which case it will not return until # something happens. For Catalyst, the restarter will end up calling # ->wait_for_events again after handling the changes. my @events = $self->_inotify->read; my ( $old_map, $new_map ); if ( $self->modify_includes_file_attributes || $self->modify_includes_content ) { $old_map = $self->_map; $new_map = $self->_current_map; } my $filter = $self->filter; my @interesting; for my $event (@events) { # 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 ); ## no critic (ControlStructures::ProhibitCascadingIfElse) 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 ); } elsif ( $event->IN_ATTRIB ) { next unless $self->_path_matches( $self->modify_includes_file_attributes, $event->fullname ); push @interesting, $event; } # We just want to check the _file_ name elsif ( $event->name =~ /$filter/ ) { push @interesting, $event; } } $self->_set_map($new_map) if $self->_has_map; return map { $_->can('path') ? $_ : $self->_convert_event( $_, $old_map, $new_map ) } @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; $mask |= IN_ATTRIB if $self->modify_includes_file_attributes; 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; 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; my $old_map = shift; my $new_map = shift; my $path = $event->fullname; my $type = $event->IN_CREATE || $event->IN_MOVED_TO ? 'create' : $event->IN_MODIFY || $event->IN_ATTRIB ? 'modify' : $event->IN_DELETE ? 'delete' : 'unknown'; my @extra; if ( $type eq 'modify' && ( $self->modify_includes_file_attributes || $self->modify_includes_content ) ) { @extra = ( $self->_modify_event_maybe_file_attribute_changes( $path, $old_map, $new_map ), $self->_modify_event_maybe_content_changes( $path, $old_map, $new_map ), ); } return $self->event_class->new( path => $path, type => $type, @extra, ); } __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.31 =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 - 2019 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.31/lib/File/ChangeNotify/Watcher/KQueue.pm0000644000175000017500000001744513415423005023675 0ustar autarchautarchpackage File::ChangeNotify::Watcher::KQueue; use strict; use warnings; use namespace::autoclean; our $VERSION = '0.31'; use File::Find qw( 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 = shift; $self->_watch_dir($_) for @{ $self->directories }; $self->_set_map( $self->_current_map ) if $self->modify_includes_file_attributes || $self->modify_includes_content; return; } sub wait_for_events { my $self = shift; while (1) { my @events = $self->_interesting_events; return @events if @events; } } around new_events => sub { my $orig = shift; my $self = shift; return $self->$orig(0); }; sub _interesting_events { my $self = shift; my $timeout = shift; 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 ( $old_map, $new_map ); if ( $self->modify_includes_file_attributes || $self->modify_includes_content ) { $old_map = $self->_map; $new_map = $self->_current_map; } my @events; for my $kevent (@kevents) { my $path = $kevent->[KQ_UDATA]; next if $self->_path_is_excluded($path); my $flags = $kevent->[KQ_FFLAGS]; ## no critic (ControlStructures::ProhibitCascadingIfElse) # 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 ) { for 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', $old_map, $new_map ); } elsif ( -d $path ) { push @events, map { $self->_event( $_, 'create' ) } $self->_watch_dir($path); } } elsif ( $flags & NOTE_ATTRIB ) { push @events, $self->_event( $path, 'modify', $old_map, $new_map ); } } $self->_set_map($new_map) if $self->_has_map; return @events; } sub _event { my $self = shift; my $path = shift; my $type = shift; my $old_map = shift; my $new_map = shift; my @extra; if ( $type eq 'modify' && ( $self->modify_includes_file_attributes || $self->modify_includes_content ) ) { @extra = ( $self->_modify_event_maybe_file_attribute_changes( $path, $old_map, $new_map ), $self->_modify_event_maybe_content_changes( $path, $old_map, $new_map ), ); } return $self->event_class->new( path => $path, type => $type, @extra, ); } sub _watch_dir { my $self = shift; my $dir = shift; 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_path($path); push @new_files, $path; } ); return @new_files; } sub _is_included_file { my $self = shift; my $path = shift; return 1 if -d $path; my $filter = $self->filter; my $filename = ( File::Spec->splitpath($path) )[2]; return 1 if $filename =~ m{$filter}; return 0; } sub _find { my $self = shift; my $dir = shift; my $wanted = shift; find( { wanted => $wanted, no_chdir => 1, follow_fast => ( $self->follow_symlinks ? 1 : 0 ), follow_skip => 2, }, $dir, ); } sub _watch_path { my $self = shift; my $path = shift; ## no critic (InputOutput::RequireBriefOpen) # Don't panic if we can't open a file open my $fh, '<', $path or warn "Can't open '$path': $!"; return unless $fh && defined fileno $fh; # Store this filehandle (this will automatically nuke any existing events # assigned to the file) $self->_files->{$path} = $fh; my $filter = NOTE_DELETE | NOTE_WRITE | NOTE_RENAME | NOTE_REVOKE; $filter |= NOTE_ATTRIB if $self->_path_matches( $self->modify_includes_file_attributes, $path ); $self->_kqueue->EV_SET( fileno($fh), EVFILT_VNODE, EV_ADD | EV_CLEAR, $filter, 0, $path, ); } __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 other 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 AUTHOR Dan Thomas, Edan@cpan.orgE =cut File-ChangeNotify-0.31/lib/File/ChangeNotify/Watcher/Default.pm0000644000175000017500000000755213415423005024060 0ustar autarchautarchpackage File::ChangeNotify::Watcher::Default; use strict; use warnings; use namespace::autoclean; our $VERSION = '0.31'; use Time::HiRes qw( sleep ); use Moo; with 'File::ChangeNotify::Watcher'; sub sees_all_events {0} ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) sub _always_requires_mtime {1} ## use critic sub BUILD { my $self = shift; $self->_set_map( $self->_current_map ); return; } 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->_current_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', ); } else { # If we're tracking stat info changes then we get the old & new # stat info back in @extra. No need to stat the path _again_. my ( $modified, @extra ) = $self->_path_was_modified( $path, $old_map, $new_map ); if ($modified) { push @interesting, $self->event_class->new( path => $path, type => 'modify', @extra, $self->_modify_event_maybe_content_changes( $path, $old_map, $new_map ), ); } } } for my $path ( sort grep { !exists $old_map->{$_} } keys %{$new_map} ) { push @interesting, $self->event_class->new( path => $path, type => 'create', ); } $self->_set_map($new_map); return @interesting; } sub _path_was_modified { my $self = shift; my $path = shift; my $old_map = shift; my $new_map = shift; my $old_entry = $old_map->{$path}; my $new_entry = $new_map->{$path}; # If it's a file and the mtime or size changed we know it's been modified # in some way. return 1 if !$old_entry->{is_dir} && ( $old_entry->{stat}{mtime} != $new_entry->{stat}{mtime} || $old_entry->{size} != $new_entry->{size} ); if ( my @attrs = $self->_modify_event_maybe_file_attribute_changes( $path, $old_map, $new_map ) ) { return ( 1, @attrs ); } return 0; } __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.31 =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 - 2019 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.31/lib/File/ChangeNotify/Watcher.pm0000644000175000017500000003170413415423005022470 0ustar autarchautarchpackage File::ChangeNotify::Watcher; use strict; use warnings; use namespace::autoclean; our $VERSION = '0.31'; use Fcntl qw( S_IMODE ); use File::ChangeNotify::Event; use File::Find qw( find ); use File::Spec; use Module::Runtime qw( use_module ); use Types::Standard qw( ArrayRef Bool ClassName CodeRef HashRef Num RegexpRef Str ); use Type::Utils -all; # 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 { require Time::HiRes; Time::HiRes->import('stat'); }; } 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 { [] }, ); has modify_includes_file_attributes => ( is => 'ro', isa => Bool | $files_or_regexps_or_code_t, default => 0, ); has modify_includes_content => ( is => 'ro', isa => Bool | $files_or_regexps_or_code_t, default => 0, ); has _map => ( is => 'ro', writer => '_set_map', isa => HashRef, predicate => '_has_map', ); sub BUILD { my $self = shift; use_module( $self->event_class ); } ## no critic ( Subroutines::ProhibitUnusedPrivateSubroutines) sub _current_map { my $self = shift; my %map; find( { wanted => sub { # File::Find seems to use '/' as the path separator on Windows # for some odd reason. It really should be using File::Spec # internally everywhere but it doesn't. my $path = $^O eq 'MSWin32' ? File::Spec->canonpath($File::Find::name) : $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; } ## use critic sub _path_is_excluded { my $self = shift; my $path = shift; return $self->_path_matches( $self->exclude, $path ); } sub _entry_for_map { my $self = shift; my $path = shift; my $is_dir = -d $path ? 1 : 0; # This should be free since the stat call was already done when checking # -d. my @stat = stat; 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, size => ( $is_dir ? 0 : $stat[7] ), $self->_maybe_file_attributes( $path, \@stat ), ( $is_dir ? () : $self->_maybe_content($path) ), }; } sub _maybe_file_attributes { my $self = shift; my $path = shift; my $stat = shift; # The Default watcher always requires the mtime, regardless of whether or # not we're including stat info in the modify events. unless ( $self->_always_requires_mtime ) { return unless $self->_path_matches( $self->modify_includes_file_attributes, $path, ); } return ( stat => $self->_stat( $path, $stat ) ); } sub _stat { my $self = shift; my $path = shift; my $stat = shift; my @stat = $stat ? @{$stat} : stat $path; return { attributes => { permissions => S_IMODE( $stat[2] ), uid => $stat[4], gid => $stat[5], }, mtime => $stat[9], }; } sub _always_requires_mtime {0} sub _maybe_content { my $self = shift; my $path = shift; return unless $self->_path_matches( $self->modify_includes_content, $path ); open my $fh, '<', $path or die "Cannot open $path for reading: $!"; binmode $fh, ':bytes' or die qq{Cannot binmode $path as ':bytes': $!}; my $content = do { local $/ = undef; <$fh>; }; close $fh or die "Cannot close $path: $!"; return ( content => $content ); } sub new_events { my $self = shift; return $self->_interesting_events; } ## no critic ( Subroutines::ProhibitUnusedPrivateSubroutines) sub _modify_event_maybe_file_attribute_changes { my $self = shift; my $path = shift; my $old_map = shift; my $new_map = shift; return unless $self->_path_matches( $self->modify_includes_file_attributes, $path, ); my $old_attr = $old_map->{$path}{stat}{attributes}; my $new_attr = $new_map->{$path}{stat}{attributes}; for my $k ( keys %{$new_attr} ) { # Any possible info retrieved from stat will be numeric, so we can # always use numeric comparison safely. return ( attributes => [ $old_attr, $new_attr ] ) if $old_attr->{$k} != $new_attr->{$k}; } return; } sub _modify_event_maybe_content_changes { my $self = shift; my $path = shift; my $old_map = shift; my $new_map = shift; return unless $self->_path_matches( $self->modify_includes_content, $path ); return ( content => [ $old_map->{$path}{content}, $new_map->{$path}{content} ] ); } sub _path_matches { my $self = shift; my $matches = shift; my $path = shift; return $matches if !ref $matches; foreach my $matcher ( @{$matches} ) { if ( my $ref = ref $matcher ) { if ( $ref eq 'Regexp' ) { return 1 if $path =~ /$matcher/; } elsif ( $ref eq 'CODE' ) { local $_ = $path; return 1 if $matcher->($path); } } else { return 1 if $path eq $matcher; } } 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.31 =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. You can block while waiting for events or do a non-blocking call asking for any new events since the last call (or since the watcher was instantiated). Different watchers will implement blocking in different ways, and the Default watcher just does a sleep loop. =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 arrayref of paths to exclude. This arrayref 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 * modify_includes_file_attributes This can either be a boolean or an arrayref. If it is an arrayref then it should contain paths for which you want information about changes to the file's attributes. This arrayref can contain plain strings, regular expressions, or subroutine references. If you provide a string it should contain the complete path to be excluded. When this matches a file, then modify events for that file will include information about the file's before and after permissions and ownership when these change. See the L documentation for details on what this looks like. =item * modify_includes_content This can either be a boolean or an arrayref. If it is an arrayref then it should contain paths for which you want to see past and current content for a file when it is modified. This arrayref can contain plain strings, regular expressions, or subroutine references. If you provide a string it should contain the complete path to be excluded. When this matches a file, then modify events for that file will include information about the file's before and after content when it changes. See the L documentation for details on what this looks like. =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 - 2019 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.31/xt/0000755000175000017500000000000013415423005015160 5ustar autarchautarchFile-ChangeNotify-0.31/xt/release/0000755000175000017500000000000013415423005016600 5ustar autarchautarchFile-ChangeNotify-0.31/xt/release/cpan-changes.t0000644000175000017500000000034413415423005021315 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.31/xt/release/meta-json.t0000644000175000017500000000006413415423005020662 0ustar autarchautarch#!perl use Test::CPAN::Meta::JSON; meta_json_ok(); File-ChangeNotify-0.31/xt/release/try-load.t0000644000175000017500000000073413415423005020524 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.31/xt/author/0000755000175000017500000000000013415423005016462 5ustar autarchautarchFile-ChangeNotify-0.31/xt/author/pod-spell.t0000644000175000017500000000070013415423005020543 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.31/xt/author/no-tabs.t0000644000175000017500000000116113415423005020211 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.31/xt/author/clean-namespaces.t0000644000175000017500000000036113415423005022046 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.31/xt/author/portability.t0000644000175000017500000000026713415423005021216 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.31/xt/author/mojibake.t0000644000175000017500000000015113415423005020425 0ustar autarchautarch#!perl use strict; use warnings qw(all); use Test::More; use Test::Mojibake; all_files_encoding_ok(); File-ChangeNotify-0.31/xt/author/test-version.t0000644000175000017500000000063713415423005021317 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.31/xt/author/pod-coverage.t0000644000175000017500000000254213415423005021225 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.31/xt/author/pod-syntax.t0000644000175000017500000000025213415423005020754 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.31/xt/author/eol.t0000644000175000017500000000121313415423005017423 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.31/xt/author/tidyall.t0000644000175000017500000000067413415423005020320 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.31/appveyor.yml0000644000175000017500000000056413415423005017122 0ustar autarchautarch--- skip_tags: true cache: - C:\strawberry install: - if not exist "C:\strawberry" cinst strawberryperl -y - set PATH=C:\strawberry\perl\bin;C:\strawberry\perl\site\bin;C:\strawberry\c\bin;%PATH% - cd %APPVEYOR_BUILD_FOLDER% - cpanm --installdeps . -n build_script: - perl -e 1 test_script: - prove -lrvm t/ ### __app_cisetup__ # --- {} ### __app_cisetup__ File-ChangeNotify-0.31/perlcriticrc0000644000175000017500000000370513415423005017142 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] # Sometimes I want to write "return unless $x > 4" [-ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions] File-ChangeNotify-0.31/cpanfile0000644000175000017500000000403413415423005016232 0ustar autarchautarchrequires "Carp" => "0"; requires "Fcntl" => "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 "Exporter" => "0"; requires "ExtUtils::MakeMaker" => "0"; requires "File::Path" => "0"; requires "File::Spec" => "0"; requires "File::Temp" => "0"; requires "FindBin" => "0"; requires "Test2::V0" => "0"; requires "Test::More" => "1.302015"; 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.31/tidyall.ini0000644000175000017500000000157513415423005016700 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.31/t/0000755000175000017500000000000013415423005014770 5ustar autarchautarchFile-ChangeNotify-0.31/t/excluded-dirs.t0000644000175000017500000000201213415423005017704 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.31/t/00-report-prereqs.dd0000644000175000017500000000776513415423005020527 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', 'Fcntl' => '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' => { 'Exporter' => '0', 'ExtUtils::MakeMaker' => '0', 'File::Path' => '0', 'File::Spec' => '0', 'File::Temp' => '0', 'FindBin' => '0', 'Test2::V0' => '0', 'Test::More' => '1.302015', 'Test::Requires' => '0', 'Test::Without::Module' => '0', 'base' => '0', 'lib' => '0' } } }; $x; }File-ChangeNotify-0.31/t/00-report-prereqs.t0000644000175000017500000001342613415423005020372 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.31/t/lib/0000755000175000017500000000000013415423005015536 5ustar autarchautarchFile-ChangeNotify-0.31/t/lib/File/0000755000175000017500000000000013415423005016415 5ustar autarchautarchFile-ChangeNotify-0.31/t/lib/File/ChangeNotify/0000755000175000017500000000000013415423005020773 5ustar autarchautarchFile-ChangeNotify-0.31/t/lib/File/ChangeNotify/TestHelper.pm0000644000175000017500000005161013415423005023413 0ustar autarchautarchpackage File::ChangeNotify::TestHelper; use strict; use warnings; use File::ChangeNotify; use File::Path qw( mkpath rmtree ); use File::Spec; use File::Temp qw( tempdir ); use Module::Runtime qw( use_module ); BEGIN { ## no critic (ErrorHandling::RequireCheckingReturnValueOfEval) eval { require Time::HiRes; Time::HiRes->import('stat'); }; } use Test2::V0; use base 'Exporter'; ## no critic (Modules::ProhibitAutomaticExportation) our @EXPORT = qw( run_tests ); ## use critic ## no critic (ValuesAndExpressions::ProhibitLeadingZeros) sub run_tests { my @classes; if ( $ENV{FCN_CLASS} ) { @classes = $ENV{FCN_CLASS}; } else { @classes = 'File::ChangeNotify::Watcher::Default'; push @classes, File::ChangeNotify->usable_classes; } for my $class (@classes) { ( my $short = $class ) =~ s/^File::ChangeNotify::Watcher:://; # $class may just be something like "Default" if it came from an env var. my $long = 'File::ChangeNotify::Watcher::' . $short; use_module($long); subtest( "$short class", sub { subtest( 'blocking', sub { _shared_tests( $long, \&_blocking ); }, ); subtest( 'nonblocking', sub { _shared_tests( $long, \&_nonblocking ); subtest( 'exclude feature', sub { _exclude_tests( $long, \&_nonblocking ) } ); subtest( 'symlinks', sub { _symlink_tests($long) } ); }, ); }, ); } done_testing(); } sub _blocking { my $watcher = shift; return $watcher->wait_for_events; } sub _nonblocking { my $watcher = shift; return $watcher->new_events; } sub _shared_tests { my @args = @_; subtest( 'single event basic tests', sub { _basic_tests(@args) } ); subtest( 'multiple events', sub { _multi_event_tests(@args) } ); subtest( 'filter', sub { _filter_tests(@args) } ); subtest( 'add/remove directory', sub { _dir_add_remove_tests(@args) } ); subtest( 'create and rename', sub { _create_and_rename_tests(@args) } ); subtest( 'modify includes stat info', sub { _modify_file_attributes_tests(@args) } ); subtest( 'modify includes content', sub { _modify_content_tests(@args) } ); } 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 = File::Spec->catfile( $dir, 'whatever' ); create_file($path); _is_events( [ $events_sub->($watcher) ], [ { path => $path, type => 'create', }, ], "added one file ($path)", ); modify_file($path); _is_events( [ $events_sub->($watcher) ], [ { path => $path, type => 'modify', }, ], "modified one file ($path)", ); delete_file($path); _is_events( [ $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 = File::Spec->catfile( $dir, 'whatever' ); create_file($path1); modify_file($path1); delete_file($path1); my $path2 = File::Spec->catfile( $dir, 'another' ); create_file($path2); modify_file($path2); if ( $watcher->sees_all_events ) { _is_events( [ $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 { _is_events( [ $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 = File::Spec->catfile( $dir, 'file.txt' ); my $temp_path = File::Spec->catfile( $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', ); } 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 = File::Spec->catfile( $dir, 'not-included' ); create_file($path1); modify_file($path1); delete_file($path1); my $path2 = File::Spec->catfile( $dir, 'foo.txt' ); create_file($path2); _is_events( [ $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 = File::Spec->catdir( $dir, 'subdir1' ); my $subdir2 = File::Spec->catdir( $dir, 'subdir2' ); mkpath( $subdir1, 0, 0755 ); rmtree($subdir1); mkpath( $subdir2, 0, 0755 ); my $path = File::Spec->catfile( $subdir2, 'whatever' ); create_file($path); if ( $watcher->sees_all_events ) { _is_events( [ $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 { _is_events( [ $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); _is_events( # 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 = File::Spec->catfile( $dir, 'include' ); create_file($included); _is_events( [ $events_sub->($watcher) ], [ { path => $included, type => 'create', }, ], "added/modified/deleted $included", ); my $ignored_dir = File::Spec->catdir( $dir, 'ignored-dir' ); mkpath( $ignored_dir, 0, 0755 ); my $excluded = File::Spec->catfile( $ignored_dir, 'foo' ); create_file($excluded); _is_events( [ $events_sub->($watcher) ], [], "created $excluded - should be ignored", ); my $excluded_file = File::Spec->catfile( $dir, 'foo.ignore' ); create_file($excluded_file); _is_events( [ $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 = File::Spec->catfile( $dir1, 'other' ); skip_all 'This platform does not support symlinks.' unless eval { ## no critic (InputOutput::RequireCheckedSyscalls) symlink $dir2 => $symlink; 1; }; my $watcher = $class->new( directories => $dir1, follow_symlinks => 0, sleep_interval => 0, ); my $path = File::Spec->catfile( $dir2, 'file' ); create_file($path); delete_file($path); _is_events( [ $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 = File::Spec->catfile( $symlink, 'file' ); _is_events( [ $watcher->new_events ], [ { path => $expected_path, type => 'create', }, ], 'one event for symlinked dir when following symlinks', ); my $dir3 = tempdir( CLEANUP => 1 ); symlink File::Spec->catdir( $dir3, '.' ), File::Spec->catdir( $dir3, 'self' ) or die $!; symlink File::Spec->catfile( $dir3, 'input-circular1' ), File::Spec->catfile( $dir3, 'input-circular2' ) or die $!; symlink File::Spec->catfile( $dir3, 'input-circular2' ), File::Spec->catfile( $dir3, 'input-circular1' ) or die $!; ok( lives { File::ChangeNotify->instantiate_watcher( directories => $dir3, follow_symlinks => 1, ); }, 'made watcher for directory with circular symlinks' ); } sub _modify_file_attributes_tests { my @args = @_; # These tests hang on Windows because Windows doesn't support chmod, so we # block waiting for an event in the blocking tests. skip_all('chmod does not work on Windows') if $^O eq 'MSWin32'; subtest( 'everything includes file_attributes', sub { _modify_file_attributes_on_everything_tests(@args) } ); subtest( 'some things includes file_attributes', sub { _modify_file_attributes_on_some_things_tests(@args) } ); } sub _modify_file_attributes_on_everything_tests { my $class = shift; my $events_sub = shift; my $dir = tempdir( CLEANUP => 1 ); my $chmod_path = File::Spec->catfile( $dir, 'will-chmod' ); create_file($chmod_path); chmod 0666, $chmod_path or die "Cannot chmod $chmod_path: $!"; # We will also modify a file to make sure that we _don't_ include file # attributes in that modify event. my $content_path = File::Spec->catfile( $dir, 'will-modify-content' ); create_file($content_path); my $watcher = $class->new( directories => $dir, follow_symlinks => 0, sleep_interval => 0, modify_includes_file_attributes => 1, ); chmod 0600, $chmod_path or die "Cannot chmod $chmod_path: $!"; modify_file($content_path); my @stat = stat $chmod_path; _is_events( [ sort { $a->path cmp $b->path } $events_sub->($watcher) ], [ { path => $chmod_path, type => 'modify', attributes => [ { permissions => 0666, uid => $stat[4], gid => $stat[5], }, { permissions => 0600, uid => $stat[4], gid => $stat[5], }, ], }, { path => $content_path, type => 'modify', }, ], 'got stat info in modify event for file that had permissions change', ); } sub _modify_file_attributes_on_some_things_tests { my $class = shift; my $events_sub = shift; my $parent = tempdir( CLEANUP => 1 ); my $subdir1 = File::Spec->catdir( $parent, 'subdir1' ); my $subdir2 = File::Spec->catdir( $parent, 'subdir2' ); for my $d ( $subdir1, $subdir2 ) { mkpath( $d, 0, 0755 ) or die "Cannot mkpath $d: $!"; } my $path1 = File::Spec->catfile( $subdir1, 'will-chmod' ); my $path2 = File::Spec->catfile( $subdir2, 'will-chmod' ); for my $p ( $path1, $path2 ) { create_file($p); chmod 0666, $p or die "Cannot chmod $p: $!"; } my $watcher = $class->new( directories => $parent, follow_symlinks => 0, sleep_interval => 0, modify_includes_file_attributes => [qr/^\Q$subdir1/], ); for my $p ( $path1, $path2 ) { chmod 0600, $p or die "Cannot chmod $p: $!"; } my @stat = stat $path1; _is_events( [ $events_sub->($watcher) ], [ { path => $path1, type => 'modify', attributes => [ { permissions => 0666, uid => $stat[4], gid => $stat[5], }, { permissions => 0600, uid => $stat[4], gid => $stat[5], }, ], }, ], 'got stat info in modify event for path where modify includes file_attributes', ); } sub _modify_content_tests { my @args = @_; subtest( 'everything includes content', sub { _modify_content_on_everything_tests(@args) } ); subtest( 'some things includes content', sub { _modify_content_on_some_things_tests(@args) } ); } sub _modify_content_on_everything_tests { my $class = shift; my $events_sub = shift; my $dir = tempdir( CLEANUP => 1 ); my $path = File::Spec->catfile( $dir, 'will-modify-content' ); create_file( $path, "first\n" ); my $watcher = $class->new( directories => $dir, follow_symlinks => 0, sleep_interval => 0, modify_includes_content => 1, ); modify_file( $path, "second\n" ); _is_events( [ $events_sub->($watcher) ], [ { path => $path, type => 'modify', content => [ "first\n", "first\nsecond\n" ], }, ], 'got content in modify event', ); } sub _modify_content_on_some_things_tests { my $class = shift; my $events_sub = shift; my $parent = tempdir( CLEANUP => 1 ); my $subdir1 = File::Spec->catdir( $parent, 'subdir1' ); my $subdir2 = File::Spec->catdir( $parent, 'subdir2' ); for my $d ( $subdir1, $subdir2 ) { mkpath( $d, 0, 0755 ) or die "Cannot mkpath $d: $!"; } my $path1 = File::Spec->catfile( $subdir1, 'will-modify-content' ); my $path2 = File::Spec->catfile( $subdir2, 'will-modify-content' ); for my $p ( $path1, $path2 ) { create_file( $p, "first\n" ); } my $watcher = $class->new( directories => $parent, follow_symlinks => 0, sleep_interval => 0, modify_includes_content => [qr/^\Q$subdir1/], ); for my $p ( $path1, $path2 ) { modify_file( $p, "second\n" ); } _is_events( [ $events_sub->($watcher) ], [ { path => $path1, type => 'modify', content => [ "first\n", "first\nsecond\n" ], }, { path => $path2, type => 'modify', }, ], 'got content in modify event for path where modify includes content', ); } sub _is_events { my $got = shift; my $expected = shift; my $desc = shift; is( $got, array { for my $e ( @{$expected} ) { item object { call path => $e->{path}; call type => $e->{type}; if ( $e->{attributes} ) { # The event's attributes method will return a two # element array where each element is a hashref # containing some keys like permissions, uid, etc. We # don't want to check all the keys, just the ones we # care about call attributes => array { for my $i ( 0, 1 ) { item $i => hash { for my $k ( sort keys %{ $e->{attributes}[$i] } ) { field $k => $e->{attributes}[$i]{$k}; } end(); }; } end(); }; } else { call has_attributes => F(); } if ( $e->{content} ) { call content => $e->{content}; } else { call has_content => F(); } }; } end(); }, "$desc" ); } sub create_file { my $path = shift; my $content = shift; diag("Creating $path"); open my $fh, '>', $path or die "Cannot write to $path: $!"; if ( defined $content ) { print {$fh} $content or die "Cannot write to $path: $!"; } close $fh or die "Cannot write to $path: $!"; } sub modify_file { my $path = shift; my $content = shift || "1\n"; diag("Modifying $path"); die "No such file $path!\n" unless -f $path; open my $fh, '>>', $path or die "Cannot write to $path: $!"; print {$fh} $content 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.31/t/instantiate-twice.t0000644000175000017500000000112313415423005020606 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.31/t/all.t0000644000175000017500000000017713415423005015732 0ustar autarchautarchuse strict; use warnings; use lib 't/lib'; use File::ChangeNotify::TestHelper; File::ChangeNotify::TestHelper::run_tests(); File-ChangeNotify-0.31/MANIFEST0000644000175000017500000000157713415423005015670 0ustar autarchautarch# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012. CODE_OF_CONDUCT.md CONTRIBUTING.md Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README.md appveyor.yml 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.31/INSTALL0000644000175000017500000000437013415423005015562 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, install configure prerequisites (see below), then build it: % perl Makefile.PL % make && make test Then install it: % make install On Windows platforms, you should use `dmake` or `nmake`, instead of `make`. 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 The prerequisites of this distribution will also have to be installed manually. The prerequisites are listed in one of the files: `MYMETA.yml` or `MYMETA.json` generated by running the manual build process described above. ## Configure Prerequisites This distribution requires other modules to be installed before this distribution's installer can be run. They can be found under the "configure_requires" key of META.yml or the "{prereqs}{configure}{requires}" key of META.json. ## Other Prerequisites This distribution may require additional modules to be installed after running Makefile.PL. Look for prerequisites in the following phases: * to run make, PHASE = build * to use the module code itself, PHASE = runtime * to run tests, PHASE = test They can all be found in the "PHASE_requires" key of MYMETA.yml or the "{prereqs}{PHASE}{requires}" key of MYMETA.json. ## Documentation File-ChangeNotify documentation is available as POD. You can run `perldoc` from a shell to read the documentation: % perldoc File::ChangeNotify For more information on installing Perl modules via CPAN, please see: https://www.cpan.org/modules/INSTALL.html File-ChangeNotify-0.31/dist.ini0000644000175000017500000000202313415423005016166 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