Skip to content

plumqqz/cms-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Использование

   use CMS::Detector qw/DetectCms/;
   my $cd = DetectCms 'http://www.some.url';

   if($cd->getCms eq CMS::Detector::CMS_BITRIX){
     print "Bitrix detected!\n";
   }
   ...

 DetectCms 
 Возвращает результат попытки определения или выбрасывает исключение в случае ошибки.

 Методы
    $cd->getCms
       Возвращает используемую CMS. Возможные значения:

           CMS::Detector::CMS_WORDPRESS 
           CMS::Detector::CMS_BITRIX 
           CMS::Detector::CMS_DRUPAL 
           CMS::Detector::CMS_JOOMLA 
           CMS::Detector::CMS_MODX 
           CMS::Detector::CMS_DATALIFE 
           CMS::Detector::CMS_OPENCART 
           CMS::Detector::CMS_SETUPRU 
           CMS::Detector::CMS_UCOZ

    $cd->getFaviconUrl
           Возврашает урл favicon

 Исключения DetectCms
 В случае ошибки DetectCms выбрасывает исключение и 
 возвращает объект CMS::Detector::Exception

 local $@;
 my $cd = eval{ $cd };
 if($@){
    my $ex = $@;
 }

   $ex->{msg} - сообщение об ошибке
   $ex->{cause} - причина

 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages