Skip to main content




Reasoning About the Rigor of Perl Programs - George Baugh - TPRC 2024 submitted by /u/briandfoy
[link] [comments]



#!/usr/local/bin/perl use v5.40; use Syntax::Operator::Matches qw( matches mismatches ); use Type::Tiny; my $x = "123"; my $y; my $z = 'abc'; if ( $x matches $z ) { say "1"; } else { say "2"; } 

Coded runs and compiles fine.

perltidy error

MacBook Pro 2021:lt administrator$ perltidy matches.pl matches.pl: Begin Error Output Stream matches.pl: matches.pl: 9: if ( $x matches $z ) { matches.pl: -- ^ matches.pl: found bareword where operator expected (previous token underlined) 

.perltidyrc
# PBP .perltidyrc file # Uncomment #-st to fully emulate perltidy -pbp -l=278 # Max line width is 78 cols -i=4 # Indent level is 4 cols -ci=4 # Continuation indent is 4 cols #-st # Output to STDOUT -b # Write the file inline and create a .bak file -se # Errors to STDERR -vt=2 # Maximal vertical tightness -cti=0 # No extra indentation for closing brackets -pt=1 # Medium parenthesis tightness -bt=1 # Medium brace tightness -sbt=1 # Medium square bracket tightness -bbt=1 # Medium block brace tightness -nsfs # No space before semicolons -nolq # Don't outdent long quoted strings #-icb # Break before all operators -wbb="% + - * / x != == >= <= =~ !~ < > | & = **= += *= &= <<= &&= -= /= |= >>= ||= //= .= %= ^= x= matches" 

spent an hour on this without luck; is there anyway to make perltidy aware of the imported matches operator?

submitted by /u/kosaromepr
[link] [comments]



Is there a way to make a readonly blessed reference that detect attempts to modify it at compile time of the script? Package Readonly , Package Const::Fast and Readonly::Tiny die at runtime

submitted by /u/ReplacementSlight413
[link] [comments]