Page Index Toggle Pages: 1 ReplyAdd Poll Send Topic
Normal Topic Subs.pm (Read 1752 times)
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Subs.pm
Sep 4th, 2014 at 10:15pm
Mark & QuoteQuote  
Too much coffee Wink

Code
Select All
 Index: cgi-bin/yabb2/Sources/Subs.pm
 ===================================================================
 --- cgi-bin/yabb2/Sources/Subs.pm	(revision 1564)
 +++ cgi-bin/yabb2/Sources/Subs.pm	(working copy)
 @@ -887,7 +887,7 @@
      LoadLanguage('Error');
      get_template('Other');

 -    my $errormessage = "$error_txt{$x[0]} $x[1]";
 +    my $errormessage = $x[0] ? ( $error_txt{$x[0]} . ( $x[1] ? " $x[1]" : q{} ) ) : isempty( $x[1], q{} );

      my ( $filename, $line, $subroutine ) = get_caller();
      if (   ( $debug == 1 || ( $debug == 2 && $iamadmin ) )
 @@ -1102,13 +1102,13 @@
              {
                  $avatar_limit ||= 0;
                  $CGI:TongueOST_MAX = int( 1024 * $avatar_limit );
 -                if ($CGI:TongueOST_MAX) { $CGI:TongueOST_MAX += 1_000_000; }    # *
 +                if ($CGI:TongueOST_MAX) { $CGI:TongueOST_MAX += 1048576; }    # *
              }
              else {

                  # If NO uploads are allowed YaBB sets this default limit
                  # to 1 MB. Change this values if you get error messages.
 -                $CGI:TongueOST_MAX = 1_000_000;
 +                $CGI:TongueOST_MAX = 1048576;
              }

          # * adds volume, if a upload limit is set, to not get error if the other
  



This pretty much cleans up confusing extra spaces in error log and fixes how 1 MB is calculated in computer world Smiley
Using underscores in numeric literals is experimental and as such should be discouraged.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Subs.pm
Reply #1 - Sep 4th, 2014 at 11:08pm
Mark & QuoteQuote  
Monni wrote on Sep 4th, 2014 at 10:15pm:
Using underscores in numeric literals is experimental and as such should be discouraged.

Damian Conway recommends it in his writings (he wrote 'Perl Best Practices') as an aid to readability.

This fix will go into the 2.6 branch for 2.6.2. I have some mod hooks and tweaks that will be going in as well. (If we don't freeze the trunk except for mission critical bug fixes, we'll never get it locked down.  Wink )
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Subs.pm
Reply #2 - Sep 5th, 2014 at 3:39am
Mark & QuoteQuote  
Dandello wrote on Sep 4th, 2014 at 11:08pm:
Monni wrote on Sep 4th, 2014 at 10:15pm:
Using underscores in numeric literals is experimental and as such should be discouraged.

Damian Conway recommends it in his writings (he wrote 'Perl Best Practices') as an aid to readability.


The problem is that Perl doesn't treat them equally with numeric literals without them... Perl treats them halfway between numeric literals and string literals... As such in some cases you have to actually explicitly strip them for code to work.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Subs.pm
Reply #3 - Sep 5th, 2014 at 3:51am
Mark & QuoteQuote  
Dandello wrote on Sep 4th, 2014 at 11:08pm:
(If we don't freeze the trunk except for mission critical bug fixes, we'll never get it locked down.  Wink )


I didn't say anything about freezing trunk... I said I shouldn't drink so much coffee... Anyways... 2.6.1 is what 2.6.0 was supposed to be... the perfect build with minimal number of glitches and bugs...

It really doesn't matter if we ever get the trunk frozen as it is not meant to be frozen, that is what for version control systems have branches and tags. All we should care about is fixing more bugs and glitches. Not forgetting we should start planning what we're gonna do with 2.6.3... We can't put all postponed changes in 2.6.2, because it would leave us nothing to work on.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Subs.pm
Reply #4 - Sep 5th, 2014 at 4:44am
Mark & QuoteQuote  
Oh, don't worry about needing things to do in 2.6.3.  Grin There's always something to do.

Traditionally YaBB has locked down versions and offered zipped up packages - mostly (I think) so modders would have a 'fixed' version to work from. That's hard to do when it keeps changing - and work on 2.6.2 starts as soon as I've finished testing the current mods and handled some mod requests.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Subs.pm
Reply #5 - Sep 5th, 2014 at 9:23am
Mark & QuoteQuote  
Dandello wrote on Sep 5th, 2014 at 4:44am:
Oh, don't worry about needing things to do in 2.6.3.  Grin There's always something to do.

Traditionally YaBB has locked down versions and offered zipped up packages - mostly (I think) so modders would have a 'fixed' version to work from. That's hard to do when it keeps changing - and work on 2.6.2 starts as soon as I've finished testing the current mods and handled some mod requests.


I'm old school guy who can handle three-way merges... So I don't need "fixed" version Wink
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
ReplyAdd Poll Send Topic
Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
Subs.pm

Please type the characters exactly as they appear in the image,
without the first 2 and last 2 characters.
The characters must be typed in the same order,
and they are case-sensitive.
Open Preview Preview

You can resize the textbox by dragging the right or bottom border.
Off Topic Comment Insert Spoiler
Insert Hyperlink Insert FTP Link Insert Image Insert E-mail Insert Media Insert Table Insert Table Row Insert Table Column Insert Horizontal Rule Insert Teletype Insert Code Insert Quote Edited Superscript Subscript Insert List /me - my name Insert Marquee Insert Timestamp No Parse
Bold Italicized Underline Insert Strikethrough Highlight
                       
Change Text Color
Insert Preformatted Text Left Align Centered Right Align
resize_wb
resize_hb







Max 5000 characters. Remaining characters:
Text size: %
More Smilies
View All Smilies
Collapse additional features Collapse/Expand additional features Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry