account.pm
branchfoerste
changeset 51 fd55e111838d
parent 50 aca7592c284b
child 52 aad3d38deac0
equal deleted inserted replaced
50:aca7592c284b 51:fd55e111838d
   469         for my $qr ( keys %q ) {
   469         for my $qr ( keys %q ) {
   470             my @q    = @{ $q{$qr} };
   470             my @q    = @{ $q{$qr} };
   471             my $elem = '';
   471             my $elem = '';
   472             $elem = shift @q while defined $elem and $elem ne 'STORAGE';
   472             $elem = shift @q while defined $elem and $elem ne 'STORAGE';
   473             my ( $used, $max ) = map { int( $_ / 1024 ) } @q[ 0 .. 1 ];
   473             my ( $used, $max ) = map { int( $_ / 1024 ) } @q[ 0 .. 1 ];
       
   474             $max ||= 1;
   474             print ", quota '$qr': $used/${max}MB "
   475             print ", quota '$qr': $used/${max}MB "
   475               . int( 100 * $used / $max ) . "%";
   476               . int( 100 * $used / $max ) . "%";
   476             $has_quota = 1;
   477             $has_quota = 1;
   477         }
   478         }
   478         print ", no quota" unless $has_quota;
   479         print ", no quota" unless $has_quota;