NAME
Developer::Dashboard::CLI::OpenFile - dashboard open-file command support
SYNOPSIS
use Developer::Dashboard::CLI::OpenFile qw(run_open_file_command);
run_open_file_command( args => \@ARGV );
DESCRIPTION
Provides the shared implementation behind the built-in dashboard of and dashboard open-file command paths.
PURPOSE
This module implements the search and resolution logic behind dashboard of and dashboard open-file. It can open direct paths, search within scopes, resolve Perl module names, resolve Java dotted class names through source trees and source archives, and rank file matches before opening or printing them.
WHY IT EXISTS
It exists because open-file behavior is much richer than a one-line shell wrapper. The dashboard needs one tested place that owns regex matching, module lookup, archive inspection, editor command selection, and the fallback rules between direct paths and scoped search.
WHEN TO USE
Use this file when changing regex matching, how Java source is found, how Perl modules are mapped to files, how multiple matches are ranked, or how the helper chooses between printing and launching an editor.
HOW TO USE
Call run_open_file_command with the raw argv array from the helper command, or use the lower-level lookup routines from tests. Direct file paths and file:line targets are handled immediately. Scoped lookup mode treats the first non-option argument as the search root or saved alias and every remaining argument as a case-insensitive regex that must match the candidate path. A single hit opens or prints that file, while multiple hits are ranked and shown as a chooser or plain list. Perl module lookup maps Foo::Bar to Foo/Bar.pm; Java lookup maps dotted class names to .java source files, source archives, or cached Maven source jars before the helper decides whether to print the path or exec the configured editor.
WHAT USES IT
It is used by the private of and open-file helper scripts, by shell users who want repo-local open-file behavior, and by the CLI coverage tests that exercise direct-path, regex, Perl-module, Java-source, ranking, and print-vs-editor flows.
EXAMPLES
dashboard open-file path/to/file.txt
dashboard open-file lib 'OpenFile\.pm$'
dashboard of . "Ok\.js$"
dashboard open-file javax.jws.WebService
dashboard of Developer::Dashboard::CLI::Paths
dashboard open-file --print bookmarks api-dashboard