Expand description
Unified refactoring engine for comprehensive code transformations. Refactoring and modernization helpers. Unified refactoring engine for Perl code transformations
This module provides a comprehensive refactoring engine that combines workspace-level operations with modern code transformations. It serves as the primary entry point for all refactoring operations in the Perl LSP ecosystem.
§LSP Workflow Integration
The refactoring engine operates within the standard LSP workflow: Parse → Index → Navigate → Complete → Analyze
- Parse Stage: Analyzes Perl syntax to understand code structure
- Index Stage: Builds cross-file symbol relationships for safe refactoring
- Navigate Stage: Updates references and maintains navigation integrity
- Complete Stage: Ensures completion accuracy after refactoring changes
- Analyze Stage: Validates refactoring results and provides feedback
§Performance Characteristics
Optimized for enterprise Perl development with large codebases:
- Memory Efficiency: Streaming approach for large file processing
- Incremental Updates: Only processes changed portions during refactoring
- Parallel Operations: Thread-safe refactoring for multi-file changes
§Architecture
The unified engine integrates existing specialized refactoring modules:
- workspace_refactor: Cross-file operations and symbol management
- modernize: Code modernization and best practice application
- import_optimizer: Import statement optimization and cleanup
Structs§
- Backup
Cleanup Result - Result of backup cleanup operation
- Backup
Info - Backup information for operation rollback
- Refactoring
Config - Configuration for refactoring operations
- Refactoring
Engine - Unified refactoring engine that coordinates all refactoring operations
- Refactoring
Operation - Record of a refactoring operation for rollback support
- Refactoring
Result - Result of a refactoring operation
Enums§
- Modernization
Pattern - Modernization patterns for legacy code
- Refactoring
Scope - Scope of refactoring operations
- Refactoring
Type - Types of refactoring operations supported by the engine