Packages / openSUSE Leap 15.6 / Development/Libraries/Perl / perl-File-Finder

Package: perl-File-Finder (0.53-bp156.3.1)

nice wrapper for File::Find ala find(1)

'File::Find' is great, but constructing the 'wanted' routine can sometimes be a pain. This module provides a 'wanted'-writer, using syntax that is directly mappable to the _find_ command's syntax. Also, I find myself (heh) frequently just wanting the list of names that match. With 'File::Find', I have to write a little accumulator, and then access that from a closure. But with 'File::Finder', I can turn the problem inside out. A 'File::Finder' object contains a hash of 'File::Find' options, and a series of steps that mimic _find_'s predicates. Initially, a 'File::Finder' object has no steps. Each step method clones the previous object's options and steps, and then adds the new step, returning the new object. In this manner, an object can be grown, step by step, by chaining method calls. Furthermore, a partial sequence can be created and held, and used as the head of many different sequences. For example, a step sequence that finds only files looks like: my $files = File::Finder->type('f'); Here, 'type' is acting as a class method and thus a constructor. An instance of 'File::Finder' is returned, containing the one step to verify that only files are selected. We could use this immediately as a 'File::Find::find' wanted routine, although it'd be uninteresting: use File::Find; find($files, "/tmp"); Calling a step method on an existing object adds the step, returning the new object: my $files_print = $files->print; And now if we use this with 'find', we get a nice display: find($files_print, "/tmp"); Of course, we didn't really need that second object: we could have generated it on the fly: find($files->print, "/tmp"); 'File::Find' supports options to modify behavior, such as depth-first searching. The 'depth' step flags this in the options as well: my $files_depth_print = $files->depth->print; However, the 'File::Finder' object needs to be told explictly to generate an options hash for 'File::Find::find' to pass this information along: find($files_depth_print->as_options, "/tmp"); A 'File::Finder' object, like the _find_ command, supports AND, OR, NOT, and parenthesized sub-expressions. AND binds tighter than OR, and is also implied everywhere that it makes sense. Like _find_, the predicates are computed in a "short-circuit" fashion, so that a false to the left of the (implied) AND keeps the right side from being evaluated, including entire parenthesized subexpressions. Similarly, if the left side of an OR is false, the right side is evaluated, and if the left side of the OR is true, the right side is skipped. Nested parens are handled properly. Parens are indicated with the rather ugly 'left' and 'right' methods: my $big_or_old_files = $files->left->size("+50")->or->atime("+30")->right; The parens here correspond directly to the parens in: find somewhere -type f '(' -size +50 -o -atime +30 ')' and are needed so that the OR and the implied ANDs have the right nesting. Besides passing the constructed 'File::Finder' object to 'File::Finder::find' directly as a 'wanted' routine or an options hash, you can also call 'find' implictly, with 'in'. 'in' provides a list of starting points, and returns all filenames that match the criteria. For example, a list of all names in /tmp can be generated simply with: my @names = File::Finder->in("/tmp"); For more flexibility, use 'collect' to execute an arbitrary block in a list context, concatenating all the results (similar to 'map'): my %sizes = File::Finder ->collect(sub { $File::Find::name => -s _ }, "/tmp"); That's all I can think of for now. The rest is in the detailed reference below.

Package information

Homepage
[http://search.cpan.org/dist/File-Finder/]
License
GPL-1.0+ or Artistic-1.0
Супровідник downstream-пакета
Невідомо: не зазначено в проіндексованому джерелі
Пакет джерела
[perl-File-Finder]
Software project
[perl-File-Finder]

Versions and downloads for perl-File-Finder

Version / releaseArchitecture / repositoryPackage sizeInstalled sizeFilesPublisher repository artifact
0.53-bp156.3.1leap-15.6 / ossnoarchopenSUSE Leap 15.6 · OSS · multi-architecture33 KiB40 KiBlist of filesperl-File-Finder-0.53-bp156.3.1.noarch.rpm
About these downloads

Кожен рядок: метадані індексу пакетів для однієї версії, архітектури, набору й репозиторію. Назви, URL і розміри зі джерела; посилання є змінним місцем отримання, не перерозповсюдженням OpenFactory.

Dependencies and recommendations for perl-File-Finder

  • dep: perl(:MODULE_COMPAT_5.26.1)

    Package not available

  • dep: perl(Test::More)

    Package not available

  • dep: perl(Text::Glob)

    Package not available

Шляхи файлів пакета (11)

Paths come from the repository package-file index for the observed builds. They describe archive/package associations, not every file that will exist on a running system after maintainer scripts, alternatives, generated state, diversions, or installation choices.

  • /usr/lib/perl5/vendor_perl/5.26.1/File
  • /usr/lib/perl5/vendor_perl/5.26.1/File/Finder
  • /usr/lib/perl5/vendor_perl/5.26.1/File/Finder.pm
  • /usr/lib/perl5/vendor_perl/5.26.1/File/Finder/Steps.pm
  • /usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi
  • /usr/share/doc/packages/perl-File-Finder
  • /usr/share/doc/packages/perl-File-Finder/Changes
  • /usr/share/doc/packages/perl-File-Finder/README
  • /usr/share/doc/packages/perl-File-Finder/TODO
  • /usr/share/man/man3/File::Finder.3pm.gz
  • /usr/share/man/man3/File::Finder::Steps.3pm.gz

Field source: openSUSE Leap 15.6 OSS

Відомі вразливості

У відстежуваних джерелах немає відповідних повідомлень.

Остання синхронізація:

[Каталог CVE]

Контрольні суми

Repository signatures authenticate metadata. Artifact hashing is recorded separately. Neither establishes package safety.

0.53-bp156.3.1 / noarchСпостережено Sep 1, 2026sha512 8d46a22813f0…7b03daaeКонтрольна сума джерела

Metadata observed; artifact bytes were not independently fetched or hashed by this catalog import. The digest below is source-reported.

Контрольна сума джерела (sha512): 8d46a22813f0f6f8cec96704048e203756aa90a31f1c63685072919cd3c1d080b6256efd4bdd27095f331c0233eb20942f19af626703c8814b80eecd7b03daae

Field source: openSUSE Leap 15.6 OSS

Джерела

  • Authoritative source; repository metadata signature verified

    Доказ підпису

    leap-15-6-oss-multiarch:ca2653101b9afba6656aea529109ba0c0f1ca1a92aa8614e7c887fda5264c230

    Repository-signature verification record
    Signed-object SHA-256
    ca2653101b9afba6656aea529109ba0c0f1ca1a92aa8614e7c887fda5264c230
    Signer fingerprint
    AD485664E901B867051AB15F35A2F86E29B700A4
    Keyring revision
    opensuse-project-signing-key.asc
    SHA-256 b5745739ebfb95b25b8e810f9bcb847fe750ccda598bd85f02f0e974599a6d7e
    Tool and policy
    gpgv (GnuPG) 2.4.9
    openfactory-software-catalog-signature-v1
    Verification time
    Sep 1, 2026
    Repository metadata hash linkage
    Result
    Recorded as verified; digest details unavailable

Використати цей пакет

OpenFactory може завантажити цю операційну систему у віртуальній машині браузера або почати збірку образу з рідною назвою пакета з цього запису.