Ananke :: Template.

وحدة النهاية الأمامية إلى قالب Ananke ::
التحميل الان

Ananke :: Template. الترتيب والملخص

الإعلانات

  • Rating:
  • رخصة:
  • Perl Artistic License
  • السعر:
  • FREE
  • اسم الناشر:
  • Udlei D. R. Nattis
  • موقع ويب الناشر:
  • http://search.cpan.org/~nattis/

Ananke :: Template. العلامات


Ananke :: Template. وصف

الوحدة الواجهة الأمامية إلى Ananke :: قالب Ananke :: Template هي وحدة بيرل بناء على Template Toolkit.synopsistemplate.pl: استخدام Ananke :: قالب؛ # vars بلدي zray؛ ادفع (@ ray، {name => 'uddhi'، last => 'nattis'})؛ اضغط (RAY، {name => 'Ananke'، Last => 'IT'})؛ My $ var = {id => 1، العنوان => "لا عنوان"، نص => "لا يوجد نص"،}؛ # دليل القالب وملف بلدي $ template_dir = "./"؛ بلدي $ template_file = "template.html"؛ بلدي $ template_vars = {'hello' => "\ Nhello world"، "scalar '=> $ var،" array' => ، "سجل" => \ Array،}؛ $ template_vars -> {script_name} = "file.pl"؛ # الطريقة الأولى - طباعة # إنشاء كائن قالب الخاص بي template الخاص بي = جديد Ananke :: قالب ($ template_dir)؛ # قم بتشغيل قالب $ قالب-> عملية ($ template_file، $ template_vars)؛ # الطريقة 2 - طباعة Ananke :: Template :: View_template ($ template_dir، $ template_file، $ template_vars)؛ # الطريقة الثالثة - الكتابة في ملف Ananke :: Template :: View_template ($ template_dir، de template_file، $ template_vars، "/ tmp / file.html")؛ # الطريقة 4 - العودة إلى متغير بلدي $ الإرجاع = Ananke :: قالب :: View_template ($ template_dir، $ template_file، $ template_vars، 1)؛ طباعة $ الإرجاع؛ template.html: معرف: العنوان: النص: القيمة = nome = ، أخيرا = المتطلبات: perl.


Ananke :: Template. برامج ذات صلة