Accepting request 332492 from devel:languages:perl:autoupdate
OBS-URL: https://build.opensuse.org/request/show/332492 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Text-MicroMason?expand=0&rev=5
This commit is contained in:
committed by
Git OBS Bridge
parent
de2e450cb8
commit
361b4767ac
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:396f1d19872f3cc76eeded35bd0e659ffaa26eb9e0ccb785acb3933a6b87e832
|
|
||||||
size 69856
|
|
3
Text-MicroMason-2.16.tar.gz
Normal file
3
Text-MicroMason-2.16.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a892f5529197c3ca7561b058fa34306ec32564714e1afddf6285416ef3341dd6
|
||||||
|
size 83298
|
23
cpanspec.yml
Normal file
23
cpanspec.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
#description_paragraphs: 3
|
||||||
|
#no_testing: broken upstream
|
||||||
|
#sources:
|
||||||
|
# - source1
|
||||||
|
# - source2
|
||||||
|
#patches:
|
||||||
|
# foo.patch: -p1
|
||||||
|
# bar.patch:
|
||||||
|
#preamble: |-
|
||||||
|
# BuildRequires: gcc-c++
|
||||||
|
#post_prep: |-
|
||||||
|
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
|
||||||
|
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
|
||||||
|
#post_install: |-
|
||||||
|
# sed on %{name}.files
|
||||||
|
#license: SUSE-NonFree
|
||||||
|
#skip_noarch: 1
|
||||||
|
#custom_build: |-
|
||||||
|
#./Build build flags=%{?_smp_mflags} --myflag
|
||||||
|
#custom_test: |-
|
||||||
|
#startserver && make test
|
||||||
|
#ignore_requires: Bizarre::Module
|
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Sep 20 16:33:50 UTC 2015 - coolo@suse.com
|
||||||
|
|
||||||
|
- updated to 2.16
|
||||||
|
see /usr/share/doc/packages/perl-Text-MicroMason/CHANGES
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jan 21 20:34:38 UTC 2011 - coolo@novell.com
|
Fri Jan 21 20:34:38 UTC 2011 - coolo@novell.com
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package perl-Text-MicroMason
|
# spec file for package perl-Text-MicroMason
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,27 +16,22 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Name: perl-Text-MicroMason
|
Name: perl-Text-MicroMason
|
||||||
Version: 2.13
|
Version: 2.16
|
||||||
Release: 1
|
Release: 0
|
||||||
License: GPL+ or Artistic
|
|
||||||
%define cpan_name Text-MicroMason
|
%define cpan_name Text-MicroMason
|
||||||
Summary: Simple and Extensible Templating
|
Summary: Simple and Extensible Templating
|
||||||
Url: http://search.cpan.org/dist/Text-MicroMason/
|
License: Artistic-1.0 or GPL-1.0+
|
||||||
Group: Development/Libraries/Perl
|
Group: Development/Libraries/Perl
|
||||||
#Source: http://www.cpan.org/authors/id/F/FE/FERRENCY/Text-MicroMason-%{version}.tar.gz
|
Url: http://search.cpan.org/dist/Text-MicroMason/
|
||||||
Source: %{cpan_name}-%{version}.tar.gz
|
Source0: http://www.cpan.org/authors/id/F/FE/FERRENCY/%{cpan_name}-%{version}.tar.gz
|
||||||
BuildRequires: perl(Class::MixinFactory) >= 0.9
|
Source1: cpanspec.yml
|
||||||
BuildRequires: perl(Cwd) >= 2.21
|
BuildArch: noarch
|
||||||
BuildRequires: perl(File::Spec) >= 0.9
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: perl-macros
|
BuildRequires: perl-macros
|
||||||
|
BuildRequires: perl(Class::MixinFactory) >= 0.9
|
||||||
Requires: perl(Class::MixinFactory) >= 0.9
|
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}
|
%{perl_requires}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -47,97 +42,6 @@ Each MicroMason object acts as a "template compiler," which converts
|
|||||||
templates from text-with-embedded-code formats into ready-to-execute Perl
|
templates from text-with-embedded-code formats into ready-to-execute Perl
|
||||||
subroutines.
|
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>$name</%args>Hello <% $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
|
%prep
|
||||||
%setup -q -n %{cpan_name}-%{version}
|
%setup -q -n %{cpan_name}-%{version}
|
||||||
|
|
||||||
@@ -153,10 +57,8 @@ Mixin Selection
|
|||||||
%perl_process_packlist
|
%perl_process_packlist
|
||||||
%perl_gen_filelist
|
%perl_gen_filelist
|
||||||
|
|
||||||
%clean
|
|
||||||
%{__rm} -rf %{buildroot}
|
|
||||||
|
|
||||||
%files -f %{name}.files
|
%files -f %{name}.files
|
||||||
%defattr(644,root,root,755)
|
%defattr(-,root,root,755)
|
||||||
|
%doc CHANGES README samples TODO
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user