File: DependencyList.pm

package info (click to toggle)
libconfig-model-dpkg-perl 3.017
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,048 kB
  • sloc: perl: 8,530; python: 242; makefile: 77; javascript: 16; sh: 1
file content (16 lines) | stat: -rw-r--r-- 313 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package Config::Model::Dpkg::DependencyList;

use strict;
use warnings;
use Mouse;

extends qw/Config::Model::ListId/ ;

sub sort_algorithm {
    return sub {
        (substr($_[0],0,1) eq '$' xor substr($_[1],0,1) eq '$') ? $_[1]->fetch cmp $_[0]->fetch
            : $_[0]->fetch cmp $_[1]->fetch;
    };
}

1;