commit 90744b014152f931c3c57e3fce18bf7daff058df7df11de828826ff8a48ca0e6 Author: Stephan Kulow Date: Fri Jan 21 20:34:42 2011 +0000 iniital package OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Text-MicroMason?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Text-MicroMason-2.13.tar.bz2 b/Text-MicroMason-2.13.tar.bz2 new file mode 100644 index 0000000..12f8ec4 --- /dev/null +++ b/Text-MicroMason-2.13.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a017c3eb188e49801049d605cf8799573f32335b9bbc9d2d1b9edd7912c87531 +size 55563 diff --git a/perl-Text-MicroMason.changes b/perl-Text-MicroMason.changes new file mode 100644 index 0000000..e8104e9 --- /dev/null +++ b/perl-Text-MicroMason.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Fri Jan 21 20:34:38 UTC 2011 - coolo@novell.com + +- initial package 2.13 + * created by cpanspec 1.78.03 + diff --git a/perl-Text-MicroMason.spec b/perl-Text-MicroMason.spec new file mode 100644 index 0000000..658e7c3 --- /dev/null +++ b/perl-Text-MicroMason.spec @@ -0,0 +1,160 @@ +# +# spec file for package perl-Text-MicroMason (Version 2.13) +# +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +Name: perl-Text-MicroMason +Version: 2.13 +Release: 1 +License: GPL+ or Artistic +%define cpan_name Text-MicroMason +Summary: Simple and Extensible Templating +Url: http://search.cpan.org/dist/Text-MicroMason/ +Group: Development/Libraries/Perl +#Source: http://www.cpan.org/authors/id/F/FE/FERRENCY/Text-MicroMason-%{version}.tar.gz +Source: %{cpan_name}-%{version}.tar.bz2 +BuildRequires: perl(Class::MixinFactory) >= 0.9 +BuildRequires: perl(Cwd) >= 2.21 +BuildRequires: perl(File::Spec) >= 0.9 +BuildRequires: perl +BuildRequires: perl-macros +Requires: perl(Class::MixinFactory) >= 0.9 +Requires: perl(Cwd) >= 2.21 +Requires: perl(File::Spec) >= 0.9 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch +%{perl_requires} + +%description +Text::MicroMason interpolates blocks of Perl code embedded into text +strings. + +Each MicroMason object acts as a "template compiler," which converts +templates from text-with-embedded-code formats into ready-to-execute Perl +subroutines. + +MicroMason Initialization + Use the new() method to create a Text::MicroMason object with the + appropriate mixins and attributes. + + $mason = Text::MicroMason->new( %attribs ); + + You may pass attributes as key-value pairs to the new() method to save + various options for later use by the compile() method. + +Template Compilation + To compile a text template, pass it to the compile() method to produce + a new Perl subroutine to be returned as a code reference: + + $code_ref = $mason->compile( $type => $source, %attribs ); + + Any attributes provided to compile() will temporarily override the + persistent options defined by new(), for that template only. + + You can provide the template as a text string, a file name, or an open + file handle: + + $code_ref = $mason->compile( text => $template ); + $code_ref = $mason->compile( text => \$template ); + $code_ref = $mason->compile( file => $filename ); + $code_ref = $mason->compile( handle => $fh ); + $code_ref = $mason->compile( handle => \*FILE ); + + Template files are just plain text files that contains the string to be + parsed. The files may have any name and extension you wish. The + filename specified can either be absolute or relative to the program's + current directory. + +Template Execution + To execute the template and obtain the output, call a compiled + function: + + $result = $code_ref->( @arguments ); + + (Note that the $code_ref->() syntax is unavailable in older versions of + Perl; use the equivalent &$code_ref() syntax instead.) + + As a shortcut, the execute method compiles and runs the template one + time: + + $result = $mason->execute( $type => $source, @arguments ); + $result = $mason->execute( $type => $source, \%attribs, @arguments ); + +Argument Passing + You can pass arguments to a template subroutine using positional or + named arguments. + + For positional arguments, pass the argument list and read from @_ as + usual: + + $mason->compile( text=>'Hello <% shift(@_) %>.' )->( 'Dave' ); + + For named arguments, pass in a hash of key-value pairs to be made + accessible in an '%ARGS' hash within the template subroutine: + + $mason->compile( text=>'Hello <% $ARGS{name} %>.' )->( name=>'Dave' ); + + Additionally, you can use named arguments with the %args block syntax: + + $mason->compile( text=>'<%args>$nameHello <% $name %>.' )->( name=>'Dave' ); + +Mixin Selection + Arguments passed to new() that begin with a dash will be added as mixin + classes. + + $mason = Text::MicroMason->new( -Mixin1, %attribs, -Mixin2 ); + + Every MicroMason object inherits from an abstract Base class and some + set of mixin classes. By combining mixins you can create subclasses + with the desired combination of features. See the + Text::MicroMason::Base manpage for documentation of the base class, + including private methods and extension mechanisms. + + If you call the new method on Text::MicroMason, it automatically + includes the HTMLMason mixin, which provides the standard template + syntax. If you want to create an object without the default HTMLMason + functionality, call Text::MicroMason::Base->new() instead. + + Some mixins define the syntax for a particular template format. You + will generally need to select one, and only one, of the mixins listed + in the /"TEMPLATE SYNTAXES" manpage. + + Other mixins provide optional functionality. Those mixins may define + additional public methods, and may support or require values for + various additional attributes. For a list of such mixin classes, see + the /"MIXIN FEATURES" manpage. + +%prep +%setup -q -n %{cpan_name}-%{version} + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor +%{__make} %{?_smp_mflags} + +%check +%{__make} test + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%clean +%{__rm} -rf %{buildroot} + +%files -f %{name}.files +%defattr(644,root,root,755) + +%changelog