/[pxelator]/lib/PXElator/format.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/format.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 215 by dpavlin, Thu Aug 13 12:06:35 2009 UTC revision 216 by dpavlin, Thu Aug 13 13:06:18 2009 UTC
# Line 4  use warnings; Line 4  use warnings;
4  use strict;  use strict;
5    
6  sub mac {  sub mac {
7          my ( $mac, $op ) = @_;          my ($mac,$op) = @_;
8          $op ||= 'html';          $op ||= '';
9          $mac =~ s{(..)}{$1:}g;          if ( $mac !~ m{:} ) {
10          $mac =~ s{:$}{};                  $mac =~ s{(..)}{$1:}g;
11          $mac = qq|<tt>$mac</tt>| if (caller(1))[3] =~ m{^httpd} && $op ne 'clean';                  $mac =~ s{:$}{};
12            }
13            $mac = qq|<tt>$mac</tt>| if $op =~ m{htm};
14          return uc($mac);          return uc($mac);
15  }  }
16    

Legend:
Removed from v.215  
changed lines
  Added in v.216

  ViewVC Help
Powered by ViewVC 1.1.26