From b4df04aae528801847e2b2849a7832803bdbb49e Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 12 Dec 2011 19:54:48 +0000 Subject: (may_use_Driver2) simplify (more generic, more readable) --- lib/Xconfig/proprietary.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Xconfig/proprietary.pm b/lib/Xconfig/proprietary.pm index 5dcf17d..756387c 100644 --- a/lib/Xconfig/proprietary.pm +++ b/lib/Xconfig/proprietary.pm @@ -81,10 +81,8 @@ sub may_use_Driver2 { my $card2 = { %$card, - $card->{Driver2} =~ /^nvidia(.*)/ ? - (Driver => 'nvidia', DriverVersion => $1) : - $card->{Driver2} =~ /^fglrx(.*)/ ? - (Driver => 'fglrx', DriverVersion => $1) : + $card->{Driver2} =~ /^(fglrx|nvidia)(.*)/ ? + (Driver => $1, DriverVersion => $2) : (Driver => $card->{Driver2}), }; -- cgit v1.2.1