mirror of
				https://github.com/pragma-/pbot.git
				synced 2025-11-04 00:27:23 +01:00 
			
		
		
		
	Interpreter: add default options to split_line()
This commit is contained in:
		
							parent
							
								
									f0181c7a69
								
							
						
					
					
						commit
						4826b1c851
					
				@ -548,6 +548,13 @@ sub extract_bracketed {
 | 
			
		||||
sub split_line {
 | 
			
		||||
  my ($self, $line, %opts) = @_;
 | 
			
		||||
 | 
			
		||||
  my %default_opts = (
 | 
			
		||||
    strip_quotes => 0,
 | 
			
		||||
    keep_spaces => 0
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
  %opts = (%default_opts, %opts);
 | 
			
		||||
 | 
			
		||||
  my @chars = split //, $line;
 | 
			
		||||
 | 
			
		||||
  my @args;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user